diff --git a/upath/tests/implementations/test_s3.py b/upath/tests/implementations/test_s3.py index a7fcc5ad..226324e0 100644 --- a/upath/tests/implementations/test_s3.py +++ b/upath/tests/implementations/test_s3.py @@ -170,6 +170,7 @@ def test_pathlib_consistent_join(): def test_copy__object_key_collides_with_dir_prefix(s3_server, tmp_path): + pytest.importorskip("s3fs") anon, s3so = s3_server s3 = fsspec.filesystem("s3", anon=anon, **{**s3so, "use_listings_cache": False}) diff --git a/upath/tests/test_relative.py b/upath/tests/test_relative.py index 8d71bb45..266b610e 100644 --- a/upath/tests/test_relative.py +++ b/upath/tests/test_relative.py @@ -35,6 +35,10 @@ def test_protocol_storage_options_fs_preserved(protocol, storage_options, path, assert rel.protocol == protocol assert dict(**rel.storage_options) == storage_options + try: + rel.fs + except ImportError: + pytest.skip(reason=f"{protocol} not available") assert isinstance(rel.fs, type(p.fs))