From 5980f220ff75116cfa765e3dc56909cc09c64ffb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mirko=20M=C3=A4licke?= Date: Mon, 16 Oct 2023 17:34:16 +0200 Subject: [PATCH] check most init params combinations --- skgstat/tests/test_gstatsim_interface.py | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/skgstat/tests/test_gstatsim_interface.py b/skgstat/tests/test_gstatsim_interface.py index 7f8adfc..3efe128 100644 --- a/skgstat/tests/test_gstatsim_interface.py +++ b/skgstat/tests/test_gstatsim_interface.py @@ -60,6 +60,31 @@ def test_grid_resolution_from_bbox(): assert grid.cols == 96 +@pytest.mark.skipif(sys.version_info < (3, 8), reason="requires Python >= 3.8 or higher") +def test_grid_init_symetric_bbox(): + bbox = [0, 100, 0, 100] + grid = Grid(bbox=bbox, resolution=5) + + assert grid.rows == 21 + assert grid.cols == 21 + + +@pytest.mark.skipif(sys.version_info < (3, 8), reason="requires Python >= 3.8 or higher") +def test_grid_init_bbox_row_and_resolution(): + bbox = [0, 100, 0, 100] + grid = Grid(bbox=bbox, rows=21, resolution=5) + + assert grid.shape == (21, 21) + + +@pytest.mark.skipif(sys.version_info < (3, 8), reason="requires Python >= 3.8 or higher") +def test_grid_init_bbox_col_and_resolution(): + bbox = [0, 100, 0, 100] + grid = Grid(bbox=bbox, cols=21, resolution=5) + + assert grid.shape == (21, 21) + + @pytest.mark.skipif(sys.version_info < (3, 8), reason="requires Python >= 3.8 or higher") def test_grid_rows_setting(): grid = Grid(variogram, resolution=5)