From bfb6829c1b29773f9d854a17302e34df176b763c Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 16 Mar 2022 22:06:40 -0500 Subject: [PATCH] Fix integration tests on macOS/Windows --- tests/samplers/test_batch.py | 4 +++- tests/samplers/test_single.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/samplers/test_batch.py b/tests/samplers/test_batch.py index 952f36dd15d..92d4d8c47fb 100644 --- a/tests/samplers/test_batch.py +++ b/tests/samplers/test_batch.py @@ -39,7 +39,9 @@ def __getitem__(self, query: BoundingBox) -> Dict[str, BoundingBox]: class TestBatchGeoSampler: @pytest.fixture(scope="class") def dataset(self) -> CustomGeoDataset: - return CustomGeoDataset() + ds = CustomGeoDataset() + ds.index.insert(0, (0, 100, 200, 300, 400, 500)) + return ds @pytest.fixture(scope="function") def sampler(self) -> CustomBatchGeoSampler: diff --git a/tests/samplers/test_single.py b/tests/samplers/test_single.py index 9dd49f24c79..529342b4b5f 100644 --- a/tests/samplers/test_single.py +++ b/tests/samplers/test_single.py @@ -39,7 +39,9 @@ def __getitem__(self, query: BoundingBox) -> Dict[str, BoundingBox]: class TestGeoSampler: @pytest.fixture(scope="class") def dataset(self) -> CustomGeoDataset: - return CustomGeoDataset() + ds = CustomGeoDataset() + ds.index.insert(0, (0, 100, 200, 300, 400, 500)) + return ds @pytest.fixture(scope="function") def sampler(self) -> CustomGeoSampler: