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

Method test_delete_dir

Lib/test/test_pathlib/test_pathlib.py:2115–2131  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2113 self.assertFileNotFound(p._delete)
2114
2115 def test_delete_dir(self):
2116 base = self.cls(self.base)
2117 base.joinpath('dirA')._delete()
2118 self.assertFalse(base.joinpath('dirA').exists())
2119 self.assertFalse(base.joinpath('dirA', 'linkC').exists(
2120 follow_symlinks=False))
2121 base.joinpath('dirB')._delete()
2122 self.assertFalse(base.joinpath('dirB').exists())
2123 self.assertFalse(base.joinpath('dirB', 'fileB').exists())
2124 self.assertFalse(base.joinpath('dirB', 'linkD').exists(
2125 follow_symlinks=False))
2126 base.joinpath('dirC')._delete()
2127 self.assertFalse(base.joinpath('dirC').exists())
2128 self.assertFalse(base.joinpath('dirC', 'dirD').exists())
2129 self.assertFalse(base.joinpath('dirC', 'dirD', 'fileD').exists())
2130 self.assertFalse(base.joinpath('dirC', 'fileC').exists())
2131 self.assertFalse(base.joinpath('dirC', 'novel.txt').exists())
2132
2133 def test_delete_missing(self):
2134 tmp = self.cls(self.base, 'delete')

Callers

nothing calls this directly

Calls 5

assertFalseMethod · 0.80
clsMethod · 0.45
_deleteMethod · 0.45
joinpathMethod · 0.45
existsMethod · 0.45

Tested by

no test coverage detected