[Git][debian-gis-team/python-pyproj][upstream] New upstream version 3.0~rc2
Bas Couwenberg
gitlab at salsa.debian.org
Wed Nov 4 05:15:38 GMT 2020
Bas Couwenberg pushed to branch upstream at Debian GIS Project / python-pyproj
Commits:
fe0454a8 by Bas Couwenberg at 2020-11-04T05:58:33+01:00
New upstream version 3.0~rc2
- - - - -
5 changed files:
- pytest.ini
- test/crs/test_crs.py
- test/test_cli.py
- test/test_datum.py
- test/test_transformer.py
Changes:
=====================================
pytest.ini
=====================================
@@ -2,3 +2,5 @@
markers =
slow: marks tests as slow (deselect with '-m "not slow"')
network: marks tests that need a network connection (deselect with '-m "not network"')
+ cli: marks tests that need the CLI installed (deselect with '-m "not cli"')
+ grid: marks tests that need transformation grids (deselect with '-m "not grid"')
=====================================
test/crs/test_crs.py
=====================================
@@ -561,6 +561,7 @@ def test_coordinate_operation_grids():
)
+ at pytest.mark.grid
def test_coordinate_operation_grids__alternative_grid_name():
cc = CoordinateOperation.from_epsg(1312, True)
assert len(cc.grids) == 1
=====================================
test/test_cli.py
=====================================
@@ -18,6 +18,7 @@ PYPROJ_CLI_ENDPONTS = pytest.mark.parametrize(
)
+ at pytest.mark.cli
@PYPROJ_CLI_ENDPONTS
def test_main(input_command, tmpdir):
with tmp_chdir(str(tmpdir)):
@@ -29,6 +30,7 @@ def test_main(input_command, tmpdir):
assert "-v, --verbose Show verbose debugging version information." in output
+ at pytest.mark.cli
@PYPROJ_CLI_ENDPONTS
@pytest.mark.parametrize("option", ["-v", "--verbose"])
def test_main__verbose(input_command, option, tmpdir):
@@ -46,6 +48,7 @@ def test_main__verbose(input_command, option, tmpdir):
assert "-v, --verbose " not in output
+ at pytest.mark.cli
@PYPROJ_CLI_ENDPONTS
@pytest.mark.parametrize("option", [["-h"], []])
def test_sync(input_command, option, tmpdir):
@@ -74,6 +77,7 @@ def _check_list_files_header(lines):
assert lines[1].rstrip("\r") == "----------------------------------"
+ at pytest.mark.cli
@pytest.mark.network
@PYPROJ_CLI_ENDPONTS
def test_sync__source_id__list(input_command, tmpdir):
@@ -96,6 +100,7 @@ def test_sync__source_id__list(input_command, tmpdir):
assert "fr_ign" == line.split("|")[1].strip()
+ at pytest.mark.cli
@pytest.mark.network
@PYPROJ_CLI_ENDPONTS
def test_sync__area_of_use__list(input_command, tmpdir):
@@ -118,6 +123,7 @@ def test_sync__area_of_use__list(input_command, tmpdir):
assert "France" in line.split("|")[-1]
+ at pytest.mark.cli
@pytest.mark.network
@PYPROJ_CLI_ENDPONTS
def test_sync__file__list(input_command, tmpdir):
@@ -140,6 +146,7 @@ def test_sync__file__list(input_command, tmpdir):
assert "ntf_r93" in line.split("|")[0]
+ at pytest.mark.cli
@pytest.mark.network
@PYPROJ_CLI_ENDPONTS
def test_sync__bbox__list(input_command, tmpdir):
@@ -163,6 +170,7 @@ def test_sync__bbox__list(input_command, tmpdir):
assert " | fr_ign | " in output
+ at pytest.mark.cli
@pytest.mark.network
@PYPROJ_CLI_ENDPONTS
def test_sync__bbox__list__exclude_world_coverage(input_command, tmpdir):
@@ -187,6 +195,7 @@ def test_sync__bbox__list__exclude_world_coverage(input_command, tmpdir):
assert " | fr_ign | " in output
+ at pytest.mark.cli
@PYPROJ_CLI_ENDPONTS
@pytest.mark.parametrize(
"extra_arg",
=====================================
test/test_datum.py
=====================================
@@ -5,6 +5,7 @@ from pyproj import CRS, Proj, transform
from test.conftest import grids_available
+ at pytest.mark.grid
@pytest.mark.parametrize("proj_class", [Proj, CRS])
def test_datum(proj_class):
p1 = proj_class(proj="latlong", datum="WGS84")
=====================================
test/test_transformer.py
=====================================
@@ -30,6 +30,7 @@ def test_tranform_wgs84_to_custom():
assert f"{xx:.3f} {yy:.3f}" == "212.623 4604.975"
+ at pytest.mark.grid
def test_transform_wgs84_to_alaska():
with pytest.warns(FutureWarning):
lat_lon_proj = pyproj.Proj(init="epsg:4326", preserve_units=False)
@@ -497,6 +498,7 @@ def test_repr(from_crs, to_crs, expected_repr):
assert repr(Transformer.from_crs(from_crs, to_crs)) == expected_repr
+ at pytest.mark.grid
def test_repr__conditional():
trans_repr = repr(Transformer.from_crs(4326, 26917))
if grids_available(
@@ -608,6 +610,7 @@ def test_transformer_group():
assert trans_group.best_available
+ at pytest.mark.grid
def test_transformer_group__unavailable():
trans_group = TransformerGroup(4326, 2964)
for transformer in trans_group.transformers:
@@ -649,6 +652,7 @@ def test_transformer_group__unavailable():
assert not trans_group.best_available
+ at pytest.mark.grid
def test_transform_group__missing_best():
with pytest.warns(FutureWarning):
lat_lon_proj = pyproj.Proj(init="epsg:4326", preserve_units=False)
@@ -675,6 +679,7 @@ def test_transform_group__missing_best():
assert "ntv2_0" in trans_group.transformers[0].definition
+ at pytest.mark.grid
def test_transform_group__area_of_interest():
if not grids_available("ca_nrc_ntv2_0.tif"):
with pytest.warns(
@@ -707,6 +712,7 @@ def test_transform_group__area_of_interest():
)
+ at pytest.mark.grid
def test_transformer_group__get_transform_crs():
tg = TransformerGroup("epsg:4258", "epsg:7415")
if not grids_available("nl_nsgi_rdtrans2018.tif"):
@@ -715,6 +721,7 @@ def test_transformer_group__get_transform_crs():
assert len(tg.transformers) == 2
+ at pytest.mark.grid
def test_transformer__area_of_interest():
transformer = Transformer.from_crs(
4326, 2964, area_of_interest=AreaOfInterest(-136.46, 49.0, -60.72, 83.17)
@@ -729,6 +736,7 @@ def test_transformer__area_of_interest():
)
+ at pytest.mark.grid
def test_transformer_proj__area_of_interest():
transformer = Transformer.from_proj(
4326, 2964, area_of_interest=AreaOfInterest(-136.46, 49.0, -60.72, 83.17)
@@ -870,6 +878,7 @@ def test_transformer_group__network_enabled():
assert grid.available
+ at pytest.mark.grid
@patch.dict("os.environ", {"PROJ_NETWORK": "ON"}, clear=True)
def test_transformer_group__network_disabled():
with proj_network_env():
@@ -970,6 +979,7 @@ def test_transform_honours_input_types(x, y, z):
assert transformer.transform(xx=x, yy=y, zz=z) == (x, y, z)
+ at pytest.mark.grid
@pytest.mark.network
@patch("pyproj.transformer.get_user_data_dir")
def test_transformer_group__download_grids(get_user_data_dir_mock, tmp_path, capsys):
@@ -1016,6 +1026,7 @@ def test_transformer_group__download_grids(get_user_data_dir_mock, tmp_path, cap
download_mock.assert_not_called()
+ at pytest.mark.grid
@patch("pyproj.transformer._download_resource_file")
@patch("pyproj.transformer.get_user_data_dir")
def test_transformer_group__download_grids__directory(
View it on GitLab: https://salsa.debian.org/debian-gis-team/python-pyproj/-/commit/fe0454a8ad049555584e47f4f944215d1767f87d
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/python-pyproj/-/commit/fe0454a8ad049555584e47f4f944215d1767f87d
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20201104/d9086c8b/attachment-0001.html>
More information about the Pkg-grass-devel
mailing list