MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_context_manager

Method test_context_manager

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

Source from the content-addressed store, hash-verified

5369 del iterator
5370
5371 def test_context_manager(self):
5372 self.create_file("file.txt")
5373 self.create_file("file2.txt")
5374 with os.scandir(self.path) as iterator:
5375 next(iterator)
5376 with self.check_no_resource_warning():
5377 del iterator
5378
5379 def test_context_manager_close(self):
5380 self.create_file("file.txt")

Callers

nothing calls this directly

Calls 3

create_fileMethod · 0.95
nextFunction · 0.85
scandirMethod · 0.45

Tested by

no test coverage detected