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

Method test_delete_outer_junction

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

Source from the content-addressed store, hash-verified

2216
2217 @needs_windows
2218 def test_delete_outer_junction(self):
2219 import _winapi
2220 tmp = self.cls(self.base, 'delete')
2221 tmp.mkdir()
2222 src = tmp / 'cheese'
2223 dst = tmp / 'shop'
2224 src.mkdir()
2225 spam = src / 'spam'
2226 spam.write_text('')
2227 _winapi.CreateJunction(str(src), str(dst))
2228 dst._delete()
2229 self.assertFalse(dst.exists())
2230 self.assertTrue(spam.exists())
2231 self.assertTrue(src.exists())
2232
2233 @unittest.skipUnless(hasattr(os, "mkfifo"), 'requires os.mkfifo()')
2234 @unittest.skipIf(sys.platform == "vxworks",

Callers

nothing calls this directly

Calls 8

strFunction · 0.85
assertFalseMethod · 0.80
assertTrueMethod · 0.80
clsMethod · 0.45
mkdirMethod · 0.45
write_textMethod · 0.45
_deleteMethod · 0.45
existsMethod · 0.45

Tested by

no test coverage detected