Skip to content

Commit e065656

Browse files
committed
tests: add a simplecache fs tokenization test
1 parent 43e60fa commit e065656

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

fsspec/implementations/tests/test_cached.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,3 +1358,11 @@ def test_local_temp_file_put_by_list2(protocol, mocker, tmp_path) -> None:
13581358
spy_put.assert_called_once_with([file.name], ["/some/file.txt"])
13591359
# which avoids isdir() check
13601360
spy_isdir.assert_not_called()
1361+
1362+
1363+
def test_simplecache_tokenization_independent_of_path():
1364+
of0 = fsspec.open("simplecache::memory://foo/bar.txt")
1365+
of1 = fsspec.open("simplecache::memory://baz/qux.txt")
1366+
assert of0.path != of1.path
1367+
assert of0.fs._fs_token_ == of1.fs._fs_token_
1368+
assert of0.fs is of1.fs

0 commit comments

Comments
 (0)