Skip to content

Commit

Permalink
Skip slow sampler tests (microsoft#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjstewart authored Oct 11, 2021
1 parent c0405df commit 4decaa4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/samplers/test_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def test_iter(self, sampler: CustomBatchGeoSampler) -> None:
def test_len(self, sampler: CustomBatchGeoSampler) -> None:
assert len(sampler) == 2

@pytest.mark.slow
@pytest.mark.parametrize("num_workers", [0, 1, 2])
def test_dataloader(self, sampler: CustomBatchGeoSampler, num_workers: int) -> None:
ds = CustomGeoDataset()
Expand Down Expand Up @@ -93,6 +94,7 @@ def test_iter(self, sampler: RandomBatchGeoSampler) -> None:
def test_len(self, sampler: RandomBatchGeoSampler) -> None:
assert len(sampler) == sampler.length // sampler.batch_size

@pytest.mark.slow
@pytest.mark.parametrize("num_workers", [0, 1, 2])
def test_dataloader(self, sampler: RandomBatchGeoSampler, num_workers: int) -> None:
ds = CustomGeoDataset()
Expand Down
3 changes: 3 additions & 0 deletions tests/samplers/test_single.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def test_iter(self, sampler: CustomGeoSampler) -> None:
def test_len(self, sampler: CustomGeoSampler) -> None:
assert len(sampler) == 2

@pytest.mark.slow
@pytest.mark.parametrize("num_workers", [0, 1, 2])
def test_dataloader(self, sampler: CustomGeoSampler, num_workers: int) -> None:
ds = CustomGeoDataset()
Expand Down Expand Up @@ -91,6 +92,7 @@ def test_iter(self, sampler: RandomGeoSampler) -> None:
def test_len(self, sampler: RandomGeoSampler) -> None:
assert len(sampler) == sampler.length

@pytest.mark.slow
@pytest.mark.parametrize("num_workers", [0, 1, 2])
def test_dataloader(self, sampler: RandomGeoSampler, num_workers: int) -> None:
ds = CustomGeoDataset()
Expand Down Expand Up @@ -132,6 +134,7 @@ def test_iter(self, sampler: GridGeoSampler) -> None:
query.maxt - query.mint, sampler.roi.maxt - sampler.roi.mint
)

@pytest.mark.slow
@pytest.mark.parametrize("num_workers", [0, 1, 2])
def test_dataloader(self, sampler: GridGeoSampler, num_workers: int) -> None:
ds = CustomGeoDataset()
Expand Down

0 comments on commit 4decaa4

Please sign in to comment.