MCPcopy Index your code
hub / github.com/pydata/xarray / test_file_manager_read

Function test_file_manager_read

xarray/tests/test_backends_file_manager.py:226–235  ·  view source on GitHub ↗
(tmpdir, file_cache)

Source from the content-addressed store, hash-verified

224
225
226def test_file_manager_read(tmpdir, file_cache) -> None:
227 path = str(tmpdir.join("testing.txt"))
228
229 with open(path, "w") as f:
230 f.write("foobar")
231
232 manager = CachingFileManager(open, path, cache=file_cache)
233 f = manager.acquire()
234 assert f.read() == "foobar"
235 manager.close()
236
237
238def test_file_manager_acquire_context(tmpdir, file_cache) -> None:

Callers

nothing calls this directly

Calls 5

acquireMethod · 0.95
closeMethod · 0.95
CachingFileManagerClass · 0.90
readMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…