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

Method test_context_manager_close

Lib/test/test_os/test_os.py:5103–5108  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

5101 del iterator
5102
5103 def test_context_manager_close(self):
5104 self.create_file("file.txt")
5105 self.create_file("file2.txt")
5106 with os.scandir(self.path) as iterator:
5107 next(iterator)
5108 iterator.close()
5109
5110 def test_context_manager_exception(self):
5111 self.create_file("file.txt")

Callers

nothing calls this directly

Calls 3

create_fileMethod · 0.95
scandirMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected