Skip to content

Commit

Permalink
Merge branch 'gcorradini/add_back_context_manager' of https://github.…
Browse files Browse the repository at this point in the history
…com/pangeo-forge/pangeo-forge-recipes into gcorradini/add_back_context_manager
  • Loading branch information
ranchodeluxe committed Jan 18, 2024
2 parents 850546e + 10bc796 commit 68b2a5b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ def test_suffix(tmp_path):
@pytest.mark.parametrize("fs_cls", [LocalFileSystem, HTTPFileSystem, S3FileSystem, GCSFileSystem])
def test_target_storage_get_remote_protocol(fs_cls, monkeypatch):
# we need to use patch here for s3fs and gcsfs b/c they try to do so much on __init__
monkeypatch.setattr('s3fs.S3FileSystem.__init__', lambda x: None)
monkeypatch.setattr('gcsfs.GCSFileSystem.__init__', lambda x: None)
monkeypatch.setattr('pangeo_forge_recipes.storage.FSSpecTarget.__post_init__', lambda x: None)
monkeypatch.setattr("s3fs.S3FileSystem.__init__", lambda x: None)
monkeypatch.setattr("gcsfs.GCSFileSystem.__init__", lambda x: None)
monkeypatch.setattr("pangeo_forge_recipes.storage.FSSpecTarget.__post_init__", lambda x: None)
target_root = FSSpecTarget(fs_cls())
if isinstance(target_root, LocalFileSystem):
assert target_root.fs.get_fsspec_remote_protocol() == "local"
Expand Down

0 comments on commit 68b2a5b

Please sign in to comment.