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

Method test_cleanup

Lib/test/test_regrtest.py:2023–2036  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2021 self.skipTest("Modified guard")
2022
2023 def test_cleanup(self):
2024 dirname = os.path.join(self.tmptestdir, "test_python_123")
2025 os.mkdir(dirname)
2026 filename = os.path.join(self.tmptestdir, "test_python_456")
2027 open(filename, "wb").close()
2028 names = [dirname, filename]
2029
2030 cmdargs = ['-m', 'test',
2031 '--tempdir=%s' % self.tmptestdir,
2032 '--cleanup']
2033 self.run_python(cmdargs)
2034
2035 for name in names:
2036 self.assertFalse(os.path.exists(name), name)
2037
2038 @unittest.skipIf(support.is_wasi,
2039 'checking temp files is not implemented on WASI')

Callers

nothing calls this directly

Calls 7

assertFalseMethod · 0.80
openFunction · 0.50
joinMethod · 0.45
mkdirMethod · 0.45
closeMethod · 0.45
run_pythonMethod · 0.45
existsMethod · 0.45

Tested by

no test coverage detected