MCPcopy Index your code
hub / github.com/python/cpython / test_multiple_close

Method test_multiple_close

Lib/test/test_tempfile.py:1046–1052  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1044 os.rmdir(dir)
1045
1046 def test_multiple_close(self):
1047 # A NamedTemporaryFile can be closed many times without error
1048 f = tempfile.NamedTemporaryFile()
1049 f.write(b'abc\n')
1050 f.close()
1051 f.close()
1052 f.close()
1053
1054 def test_context_manager(self):
1055 # A NamedTemporaryFile can be used as a context manager

Callers

nothing calls this directly

Calls 2

writeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected