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

Method test_rmtree_on_junction

Lib/test/test_shutil.py:652–663  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

650
651 @unittest.skipUnless(_winapi, 'only relevant on Windows')
652 def test_rmtree_on_junction(self):
653 os.mkdir(TESTFN)
654 try:
655 src = os.path.join(TESTFN, 'cheese')
656 dst = os.path.join(TESTFN, 'shop')
657 os.mkdir(src)
658 create_file(os.path.join(src, 'spam'))
659 _winapi.CreateJunction(src, dst)
660 self.assertRaises(OSError, shutil.rmtree, dst)
661 shutil.rmtree(dst, ignore_errors=True)
662 finally:
663 shutil.rmtree(TESTFN, ignore_errors=True)
664
665 @unittest.skipUnless(hasattr(os, "mkfifo"), 'requires os.mkfifo()')
666 @unittest.skipIf(sys.platform == "vxworks",

Callers

nothing calls this directly

Calls 4

create_fileFunction · 0.70
mkdirMethod · 0.45
joinMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected