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

Method test_context_manager

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

Source from the content-addressed store, hash-verified

5093 del iterator
5094
5095 def test_context_manager(self):
5096 self.create_file("file.txt")
5097 self.create_file("file2.txt")
5098 with os.scandir(self.path) as iterator:
5099 next(iterator)
5100 with self.check_no_resource_warning():
5101 del iterator
5102
5103 def test_context_manager_close(self):
5104 self.create_file("file.txt")

Callers

nothing calls this directly

Calls 2

create_fileMethod · 0.95
scandirMethod · 0.45

Tested by

no test coverage detected