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

Method test_context_manager_close

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

Source from the content-addressed store, hash-verified

5377 del iterator
5378
5379 def test_context_manager_close(self):
5380 self.create_file("file.txt")
5381 self.create_file("file2.txt")
5382 with os.scandir(self.path) as iterator:
5383 next(iterator)
5384 iterator.close()
5385
5386 def test_context_manager_exception(self):
5387 self.create_file("file.txt")

Callers

nothing calls this directly

Calls 4

create_fileMethod · 0.95
nextFunction · 0.85
scandirMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected