1- import importlib
21import os
32
43import fsspec
54import pytest
6- from fsspec import register_implementation
75from fsspec .core import url_to_fs
86from fsspec .registry import _registry as _fsspec_registry
97
@@ -44,7 +42,6 @@ def test_compression_filesystems(compression_fs_class, gz_file, bz2_file, lz4_fi
4442 reason += require_zstandard .kwargs ["reason" ]
4543 pytest .skip (reason )
4644 fs = fsspec .filesystem (compression_fs_class .protocol , fo = input_path )
47- assert isinstance (fs , compression_fs_class )
4845 expected_filename = os .path .basename (input_path )
4946 expected_filename = expected_filename [: expected_filename .rindex ("." )]
5047 assert fs .glob ("*" ) == [expected_filename ]
@@ -61,21 +58,3 @@ def test_fs_isfile(protocol, zip_jsonl_path, jsonl_gz_path):
6158 fs , * _ = url_to_fs (path )
6259 assert fs .isfile (member_file_path )
6360 assert not fs .isfile ("non_existing_" + member_file_path )
64-
65-
66- def test_fs_overwrites ():
67- protocol = "bz2"
68-
69- # Import module
70- import datasets .filesystems
71-
72- # Overwrite protocol and reload
73- register_implementation (protocol , None , clobber = True )
74- with pytest .warns (UserWarning ) as warning_info :
75- importlib .reload (datasets .filesystems )
76-
77- assert len (warning_info ) == 1
78- assert (
79- str (warning_info [0 ].message )
80- == f"A filesystem protocol was already set for { protocol } and will be overwritten."
81- )
0 commit comments