Skip to content

Commit

Permalink
TST: Make tests PROJ 8.1+ (#1068)
Browse files Browse the repository at this point in the history
  • Loading branch information
snowman2 committed Apr 24, 2022
1 parent 8ff8d50 commit 40e3d6d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
1 change: 0 additions & 1 deletion test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

_NETWORK_ENABLED = pyproj.network.is_network_enabled()
PROJ_LOOSE_VERSION = version.parse(pyproj.__proj_version__)
PROJ_GTE_81 = PROJ_LOOSE_VERSION >= version.parse("8.1")
PROJ_GTE_82 = PROJ_LOOSE_VERSION >= version.parse("8.2")
PROJ_GTE_901 = PROJ_LOOSE_VERSION >= version.parse("9.0.1")
RGF93toWSG84 = "RGF93 v1 to WGS 84 (1)" if PROJ_GTE_82 else "RGF93 to WGS 84 (1)"
Expand Down
18 changes: 2 additions & 16 deletions test/test_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,7 @@
from pyproj.enums import TransformDirection
from pyproj.exceptions import ProjError
from pyproj.transformer import AreaOfInterest, TransformerGroup
from test.conftest import (
PROJ_GTE_81,
RGF93toWSG84,
grids_available,
proj_env,
proj_network_env,
)
from test.conftest import RGF93toWSG84, grids_available, proj_env, proj_network_env


def test_tranform_wgs84_to_custom():
Expand Down Expand Up @@ -457,14 +451,6 @@ def test_str():
assert str(Transformer.from_crs(4326, 3857)).startswith("proj=pipeline")


if PROJ_GTE_81:
_BOUND_REPR = "(-16.1, 32.88, 40.18, 84.73)"
else:
_BOUND_REPR = (
"(-16.096100515106, 32.884955146013, 40.178745269776, 84.722623821813)"
)


@pytest.mark.parametrize(
"from_crs, to_crs, expected_repr",
[
Expand All @@ -486,7 +472,7 @@ def test_str():
"Spain; Sweden; Switzerland; "
"United Kingdom (UK) including Channel Islands and Isle of Man; "
"Vatican City State.\n"
f"- bounds: {_BOUND_REPR}"
"- bounds: (-16.1, 32.88, 40.18, 84.73)"
),
),
(
Expand Down

0 comments on commit 40e3d6d

Please sign in to comment.