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

Method test_create_junction

Lib/test/test_os/test_windows.py:431–442  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

429 os.unlink(self.junction)
430
431 def test_create_junction(self):
432 _winapi.CreateJunction(self.junction_target, self.junction)
433 self.assertTrue(os.path.lexists(self.junction))
434 self.assertTrue(os.path.exists(self.junction))
435 self.assertTrue(os.path.isdir(self.junction))
436 self.assertNotEqual(os.stat(self.junction), os.lstat(self.junction))
437 self.assertEqual(os.stat(self.junction), os.stat(self.junction_target))
438
439 # bpo-37834: Junctions are not recognized as links.
440 self.assertFalse(os.path.islink(self.junction))
441 self.assertEqual(os.path.normcase("\\\\?\\" + self.junction_target),
442 os.path.normcase(os.readlink(self.junction)))
443
444 def test_unlink_removes_junction(self):
445 _winapi.CreateJunction(self.junction_target, self.junction)

Callers

nothing calls this directly

Calls 12

assertTrueMethod · 0.80
assertNotEqualMethod · 0.80
lstatMethod · 0.80
assertFalseMethod · 0.80
islinkMethod · 0.80
normcaseMethod · 0.80
lexistsMethod · 0.45
existsMethod · 0.45
isdirMethod · 0.45
statMethod · 0.45
assertEqualMethod · 0.45
readlinkMethod · 0.45

Tested by

no test coverage detected