MCPcopy Index your code
hub / github.com/ipython/ipython / test_named_file_in_temporary_directory

Function test_named_file_in_temporary_directory

tests/test_tempdir.py:14–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12
13
14def test_named_file_in_temporary_directory():
15 with NamedFileInTemporaryDirectory("filename", "wb") as file:
16 name = file.name
17 assert not file.closed
18 assert Path(name).exists()
19 file.write(b"test")
20 assert file.closed
21 assert not Path(name).exists()
22
23
24def test_temporary_working_directory():

Callers

nothing calls this directly

Calls 2

writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…