From 8199794f8d8a6ed27cc89b9810bfccca3eb8941444176eeba554aed6f2ea8509 Mon Sep 17 00:00:00 2001 From: Bruno Friedmann Date: Thu, 24 Sep 2020 08:40:04 +0000 Subject: [PATCH] Accepting request 836456 from home:LPechacek:pyproj-fix-test - Fix failing test after Proj update to 7.1.1 - added patch pyproj-3.0.0-TST-Update-tests-with-scope-remarks-649.patch OBS-URL: https://build.opensuse.org/request/show/836456 OBS-URL: https://build.opensuse.org/package/show/Application:Geo/python-pyproj?expand=0&rev=26 --- ...-Update-tests-with-scope-remarks-649.patch | 66 +++++++++++++++++++ python-pyproj.changes | 6 ++ python-pyproj.spec | 2 + 3 files changed, 74 insertions(+) create mode 100644 pyproj-3.0.0-TST-Update-tests-with-scope-remarks-649.patch diff --git a/pyproj-3.0.0-TST-Update-tests-with-scope-remarks-649.patch b/pyproj-3.0.0-TST-Update-tests-with-scope-remarks-649.patch new file mode 100644 index 0000000..77a7016 --- /dev/null +++ b/pyproj-3.0.0-TST-Update-tests-with-scope-remarks-649.patch @@ -0,0 +1,66 @@ +From: "Alan D. Snow" +Date: Fri, 29 May 2020 07:41:44 -0500 +Subject: [PATCH] TST: Update tests with scope & remarks (#649) +Git-commit: 5856cdacef62746594e17f69cb802a202d3fdfaa +Patch-mainline: v3.0.0 + +--- + test/crs/test_crs.py | 16 +++++----------- + test/test_transformer.py | 10 +++++----- + 2 files changed, 10 insertions(+), 16 deletions(-) + +diff --git a/test/crs/test_crs.py b/test/crs/test_crs.py +index 8f6683863b39..76ec7b6105d1 100644 +--- a/test/crs/test_crs.py ++++ b/test/crs/test_crs.py +@@ -1297,17 +1297,11 @@ def test_operations(): + + + def test_operations__scope_remarks(): +- +- transformer = TransformerGroup(28356, 7856).transformers[0] +- coord_op = CoordinateOperation.from_string(transformer.to_wkt()) +- assert coord_op.operations == transformer.operations +- # scope does not transfer for some reason +- # assert [op.scope for op in transformer.operations] == [ +- # op.scope for op in coord_op.operations +- # ] +- assert [op.remarks for op in transformer.operations] == [ +- op.remarks for op in coord_op.operations +- ] ++ operation = TransformerGroup(28356, 7856).transformers[0].operations[1] ++ coord_op = CoordinateOperation.from_string(operation.to_wkt()) ++ assert coord_op == operation ++ assert coord_op.remarks == operation.remarks ++ assert coord_op.scope == operation.scope + + + def test_crs_equals(): +diff --git a/test/test_transformer.py b/test/test_transformer.py +index 18e3f99576e7..1dc55cf49284 100644 +--- a/test/test_transformer.py ++++ b/test/test_transformer.py +@@ -564,15 +564,15 @@ def test_transformer__operations__scope_remarks(): + transformer = TransformerGroup(28356, 7856).transformers[0] + assert transformer.scope is None + assert [op.scope for op in transformer.operations] == [ +- None, ++ "Large and medium scale topographic mapping and engineering survey.", + "Conformal transformation of GDA94 coordinates that have been derived through " + "GNSS CORS.", +- None, ++ "Large and medium scale topographic mapping and engineering survey.", + ] +- assert [str(op.remarks)[:5] for op in transformer.operations] == [ +- "None", ++ assert [str(op.remarks)[:5].strip() for op in transformer.operations] == [ ++ "Grid", + "Scale", +- "None", ++ "Grid", + ] + + +-- +2.28.0 + diff --git a/python-pyproj.changes b/python-pyproj.changes index 051f20c..386758d 100644 --- a/python-pyproj.changes +++ b/python-pyproj.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Sep 24 06:52:00 UTC 2020 - Libor Pechacek + +- Fix failing test after Proj update to 7.1.1 + - added patch pyproj-3.0.0-TST-Update-tests-with-scope-remarks-649.patch + ------------------------------------------------------------------- Tue May 19 07:27:14 UTC 2020 - Libor Pechacek diff --git a/python-pyproj.spec b/python-pyproj.spec index 12dbc07..669fae3 100644 --- a/python-pyproj.spec +++ b/python-pyproj.spec @@ -26,6 +26,7 @@ License: SUSE-Public-Domain AND X11 Group: Development/Languages/Python URL: https://github.com/pyproj4/pyproj Source: https://files.pythonhosted.org/packages/source/p/pyproj/pyproj-%{version}.tar.gz +Patch0: pyproj-3.0.0-TST-Update-tests-with-scope-remarks-649.patch BuildRequires: %{python_module Cython} >= 0.23.5 BuildRequires: %{python_module Shapely} BuildRequires: %{python_module aenum} @@ -70,6 +71,7 @@ where you may access the most up-to-date source. %prep %setup -q -n pyproj-%{version} +%patch0 -p1 %build %python_build