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

Method test_cleanup

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

Source from the content-addressed store, hash-verified

1989 self.skipTest("Modified guard")
1990
1991 def test_cleanup(self):
1992 dirname = os.path.join(self.tmptestdir, "test_python_123")
1993 os.mkdir(dirname)
1994 filename = os.path.join(self.tmptestdir, "test_python_456")
1995 open(filename, "wb").close()
1996 names = [dirname, filename]
1997
1998 cmdargs = ['-m', 'test',
1999 '--tempdir=%s' % self.tmptestdir,
2000 '--cleanup']
2001 self.run_python(cmdargs)
2002
2003 for name in names:
2004 self.assertFalse(os.path.exists(name), name)
2005
2006 @unittest.skip("TODO: RUSTPYTHON; flaky")
2007 @unittest.skipIf(support.is_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