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

Method test_choose_directory

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

Source from the content-addressed store, hash-verified

429 extant[i] = self.do_create(pre="aa")
430
431 def test_choose_directory(self):
432 # _mkstemp_inner can create files in a user-selected directory
433 dir = tempfile.mkdtemp()
434 try:
435 self.do_create(dir=dir).write(b"blat")
436 self.do_create(dir=os_helper.FakePath(dir)).write(b"blat")
437 finally:
438 support.gc_collect() # For PyPy or other GCs.
439 os.rmdir(dir)
440
441 @os_helper.skip_unless_working_chmod
442 def test_file_mode(self):

Callers

nothing calls this directly

Calls 4

do_createMethod · 0.95
mkdtempMethod · 0.80
rmdirMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected