Skip to content

Commit 27e83c3

Browse files
committed
Add test for failure case finding itrf transform
1 parent 60700b8 commit 27e83c3

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

tests/unit/test_itrf_converter.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,16 @@ def test__itrf_transformation_step():
166166
assert np.round(actual_z, 4) == expected_z
167167

168168

169+
def test__itrf_transformation_step_failure():
170+
"""Test that the _itrf_transformation_step raises an error if there is no
171+
pre-defined transform."""
172+
173+
with pytest.raises(
174+
RuntimeError, match="Failed to find a pre-defined ITRF transformation"
175+
):
176+
_itrf_transformation_step("ITRF2022", "ITRF93")
177+
178+
169179
@pytest.mark.parametrize("timezone", ["America/Denver", "UTC"])
170180
def test__datetime_to_decimal_year(timezone, monkeypatch):
171181
monkeypatch.setenv("TZ", timezone)

0 commit comments

Comments
 (0)