Skip to content

Commit 77aa0f6

Browse files
committed
Test all builtin names for caches.
1 parent 046c989 commit 77aa0f6

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

fsspec/implementations/tests/test_cached.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ def test_blockcache_workflow(ftp_writable, tmp_path, force_save_pickle):
267267
assert f.read(5) == b"test\n"
268268

269269

270-
@pytest.mark.parametrize("impl", ["filecache", "blockcache"])
270+
@pytest.mark.parametrize("impl", ["filecache", "blockcache", "cached"])
271271
def test_workflow(ftp_writable, impl):
272272
host, port, user, pw = ftp_writable
273273
fs = FTPFileSystem(host, port, user, pw)
@@ -295,7 +295,7 @@ def test_workflow(ftp_writable, impl):
295295
) # new value, because we overwrote the cached location
296296

297297

298-
@pytest.mark.parametrize("impl", ["simplecache", "blockcache"])
298+
@pytest.mark.parametrize("impl", ["simplecache", "blockcache", "cached"])
299299
def test_glob(ftp_writable, impl):
300300
host, port, user, pw = ftp_writable
301301
fs = FTPFileSystem(host, port, user, pw)
@@ -622,7 +622,7 @@ def open_raise(*_, **__):
622622
assert "Cache save failed due to interpreter shutdown" in caplog.text
623623

624624

625-
@pytest.mark.parametrize("impl", ["filecache", "simplecache", "blockcache"])
625+
@pytest.mark.parametrize("impl", ["filecache", "simplecache", "blockcache", "cached"])
626626
def test_local_filecache_creates_dir_if_needed(impl):
627627
import tempfile
628628

@@ -875,7 +875,7 @@ def test_filecache_with_checks():
875875
assert fs.cat(f1) == data * 2 # changed, since origin changed
876876

877877

878-
@pytest.mark.parametrize("impl", ["filecache", "simplecache", "blockcache"])
878+
@pytest.mark.parametrize("impl", ["filecache", "simplecache", "blockcache", "cached"])
879879
@pytest.mark.parametrize("fs", ["local", "multi"], indirect=["fs"])
880880
def test_filecache_takes_fs_instance(impl, fs):
881881
origin = tempfile.mkdtemp()
@@ -889,7 +889,7 @@ def test_filecache_takes_fs_instance(impl, fs):
889889
assert fs2.cat(f1) == data
890890

891891

892-
@pytest.mark.parametrize("impl", ["filecache", "simplecache", "blockcache"])
892+
@pytest.mark.parametrize("impl", ["filecache", "simplecache", "blockcache", "cached"])
893893
@pytest.mark.parametrize("fs", ["local", "multi"], indirect=["fs"])
894894
def test_filecache_serialization(impl, fs):
895895
fs1 = fsspec.filesystem(impl, fs=fs)
@@ -1031,7 +1031,7 @@ def test_multi_cache(protocol):
10311031
assert f.read() == b"hello"
10321032

10331033

1034-
@pytest.mark.parametrize("protocol", ["simplecache", "filecache", "blockcache"])
1034+
@pytest.mark.parametrize("protocol", ["simplecache", "filecache", "blockcache", "cached"])
10351035
def test_multi_cat(protocol, ftp_writable):
10361036
host, port, user, pw = ftp_writable
10371037
fs = FTPFileSystem(host, port, user, pw)
@@ -1064,7 +1064,7 @@ def test_multi_cache_chain(protocol):
10641064
assert files[0].read() == b"hello"
10651065

10661066

1067-
@pytest.mark.parametrize("protocol", ["blockcache", "simplecache", "filecache"])
1067+
@pytest.mark.parametrize("protocol", ["blockcache", "cached", "simplecache", "filecache"])
10681068
def test_strip(protocol):
10691069
fs = fsspec.filesystem(protocol, target_protocol="memory")
10701070
url1 = "memory://afile"
@@ -1235,9 +1235,9 @@ def test_cache_dir_auto_deleted(temp_cache, tmpdir):
12351235
assert local.exists(cache_dir)
12361236

12371237

1238-
@pytest.mark.parametrize("protocol", ["filecache", "blockcache", "simplecache"])
1238+
@pytest.mark.parametrize("protocol", ["filecache", "blockcache", "cached", "simplecache"])
12391239
def test_cache_size(tmpdir, protocol):
1240-
if win and protocol == "blockcache":
1240+
if win and protocol in {"blockcache", "cached"}:
12411241
pytest.skip("Windows file locking affects blockcache size tests")
12421242

12431243
source = os.path.join(tmpdir, "source")

0 commit comments

Comments
 (0)