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

Method test_create_junction

Lib/test/test_os.py:3276–3287  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3274 os.unlink(self.junction)
3275
3276 def test_create_junction(self):
3277 _winapi.CreateJunction(self.junction_target, self.junction)
3278 self.assertTrue(os.path.lexists(self.junction))
3279 self.assertTrue(os.path.exists(self.junction))
3280 self.assertTrue(os.path.isdir(self.junction))
3281 self.assertNotEqual(os.stat(self.junction), os.lstat(self.junction))
3282 self.assertEqual(os.stat(self.junction), os.stat(self.junction_target))
3283
3284 # bpo-37834: Junctions are not recognized as links.
3285 self.assertFalse(os.path.islink(self.junction))
3286 self.assertEqual(os.path.normcase("\\\\?\\" + self.junction_target),
3287 os.path.normcase(os.readlink(self.junction)))
3288
3289 def test_unlink_removes_junction(self):
3290 _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