MCPcopy
hub / github.com/pandas-dev/pandas / fsspectest

Function fsspectest

pandas/tests/io/test_fsspec.py:33–51  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31
32@pytest.fixture
33def fsspectest():
34 pytest.importorskip("fsspec")
35 from fsspec import register_implementation
36 from fsspec.implementations.memory import MemoryFileSystem
37 from fsspec.registry import _registry as registry
38
39 class TestMemoryFS(MemoryFileSystem):
40 protocol = "testmem"
41 test = [None]
42
43 def __init__(self, **kwargs) -> None:
44 self.test[0] = kwargs.pop("test", None)
45 super().__init__(**kwargs)
46
47 register_implementation("testmem", TestMemoryFS, clobber=True)
48 yield TestMemoryFS()
49 registry.pop("testmem", None)
50 TestMemoryFS.test[0] = None
51 TestMemoryFS.store.clear()
52
53
54@pytest.fixture

Callers

nothing calls this directly

Calls 3

TestMemoryFSClass · 0.85
clearMethod · 0.80
popMethod · 0.45

Tested by

no test coverage detected