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: Update tests with scope & remarks #649

Merged
merged 1 commit into from
May 29, 2020
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 5 additions & 11 deletions test/crs/test_crs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
10 changes: 5 additions & 5 deletions test/test_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]


Expand Down