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

Method test_choose_directory

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

Source from the content-addressed store, hash-verified

448 extant[i] = self.do_create(pre="aa")
449
450 def test_choose_directory(self):
451 # _mkstemp_inner can create files in a user-selected directory
452 dir = tempfile.mkdtemp()
453 try:
454 self.do_create(dir=dir).write(b"blat")
455 self.do_create(dir=os_helper.FakePath(dir)).write(b"blat")
456 finally:
457 support.gc_collect() # For PyPy or other GCs.
458 os.rmdir(dir)
459
460 @os_helper.skip_unless_working_chmod
461 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