From c9ba3f878798a5f9495848878d107db92b9d2a7a Mon Sep 17 00:00:00 2001 From: Matthew Love Date: Tue, 15 Sep 2026 10:29:44 -0700 Subject: [PATCH] Add test_fetchez_module from other PR --- tests/test_fetchez_module.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/test_fetchez_module.py diff --git a/tests/test_fetchez_module.py b/tests/test_fetchez_module.py new file mode 100644 index 0000000..66a469e --- /dev/null +++ b/tests/test_fetchez_module.py @@ -0,0 +1,23 @@ +# tests/test_fetchez_module.py + +import numpy as np +import rasterio + +from fetchez.spatial import Region +from transformez.integrations.fetchez.modules.modules import TransformezMod + + +def test_generate_identity_grid(tmp_path): + module = TransformezMod( + src_region=Region(-67.001, -67.0, 44.9, 44.901), + src_datum="EPSG:5703", + dst_datum="EPSG:5703", + increment="1s", + epoch_in="2020.0", + epoch_out="2020.0", + outdir=str(tmp_path), + ) + module.run() + with rasterio.open(module.dst_fn) as dataset: + np.testing.assert_allclose(dataset.read(1), 0.0, atol=1e-6) + assert module.results[0]["meta"]["dst_datum"] == "EPSG:5703"