Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TST: Make tests PROJ 8.1+ #1068

Merged
merged 1 commit into from
Apr 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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