diff --git a/tests/datasets/test_chesapeake.py b/tests/datasets/test_chesapeake.py index 3b5ecc389c2..6416f380383 100644 --- a/tests/datasets/test_chesapeake.py +++ b/tests/datasets/test_chesapeake.py @@ -28,9 +28,10 @@ def download_url(url: str, root: str, *args: str, **kwargs: str) -> None: class TestChesapeake13: + pytest.importorskip("zipfile_deflate64") + @pytest.fixture def dataset(self, monkeypatch: MonkeyPatch, tmp_path: Path) -> Chesapeake13: - pytest.importorskip("zipfile_deflate64") monkeypatch.setattr(torchgeo.datasets.chesapeake, "download_url", download_url) md5 = "fe35a615b8e749b21270472aa98bb42c" monkeypatch.setattr(Chesapeake13, "md5", md5) diff --git a/tests/trainers/test_byol.py b/tests/trainers/test_byol.py index b1c4dd68c4f..6380d65eea0 100644 --- a/tests/trainers/test_byol.py +++ b/tests/trainers/test_byol.py @@ -43,9 +43,6 @@ class TestBYOLTask: ], ) def test_trainer(self, name: str, classname: Type[LightningDataModule]) -> None: - if name == "chesapeake_cvpr_7": - pytest.importorskip("zipfile_deflate64") - conf = OmegaConf.load(os.path.join("conf", "task_defaults", name + ".yaml")) conf_dict = OmegaConf.to_object(conf.experiment) conf_dict = cast(Dict[Any, Dict[Any, Any]], conf_dict)