You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-python/pyproj/files/pyproj-2.6.1_p1-tests.patch

59 lines
2.1 KiB

From 5856cdacef62746594e17f69cb802a202d3fdfaa Mon Sep 17 00:00:00 2001
From: "Alan D. Snow" <alansnow21@gmail.com>
Date: Fri, 29 May 2020 07:41:44 -0500
Subject: TST: Update tests with scope & remarks (#649)
---
test/crs/test_crs.py | 16 +++++-----------
test/test_transformer.py | 10 +++++-----
2 files changed, 10 insertions(+), 16 deletions(-)
--- a/test/crs/test_crs.py
+++ b/test/crs/test_crs.py
@@ -1261,17 +1261,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():
--- a/test/test_transformer.py
+++ b/test/test_transformer.py
@@ -536,15 +536,15 @@ def test_transformer__operations__scope_
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",
]