Lines Matching refs:realpath
294 tester("ntpath.realpath('.')", expected)
295 tester("ntpath.realpath('./.')", expected)
296 tester("ntpath.realpath('/'.join(['.'] * 100))", expected)
297 tester("ntpath.realpath('.\\.')", expected)
298 tester("ntpath.realpath('\\'.join(['.'] * 100))", expected)
302 tester("ntpath.realpath('..')", ntpath.dirname(expected))
303 tester("ntpath.realpath('../..')",
305 tester("ntpath.realpath('/'.join(['..'] * 50))",
307 tester("ntpath.realpath('..\\..')",
309 tester("ntpath.realpath('\\'.join(['..'] * 50))",
321 self.assertPathEqual(ntpath.realpath(ABSTFN + "1"), ABSTFN)
322 self.assertPathEqual(ntpath.realpath(os.fsencode(ABSTFN + "1")),
325 # gh-88013: call ntpath.realpath with binary drive name may raise a
333 self.assertEqual(ntpath.realpath(d), d)
337 ntpath.realpath(os_helper.TESTFN + "\0spam", strict=False))
347 self.assertRaises(FileNotFoundError, ntpath.realpath, ABSTFN, strict=True)
348 self.assertRaises(FileNotFoundError, ntpath.realpath, ABSTFN + "2", strict=True)
350 self.assertRaises(OSError, ntpath.realpath, ABSTFN + "\0spam", strict=True)
361 self.assertPathEqual(ntpath.realpath(ABSTFN + "1"), ABSTFN)
384 self.assertPathEqual(ntpath.realpath("broken"),
386 self.assertPathEqual(ntpath.realpath(r"broken\foo"),
390 self.assertPathEqual(ntpath.realpath(r"broken1"),
392 self.assertPathEqual(ntpath.realpath(r"broken1\baz"),
394 self.assertPathEqual(ntpath.realpath("broken2"),
396 self.assertPathEqual(ntpath.realpath("broken3"),
398 self.assertPathEqual(ntpath.realpath("broken4"),
400 self.assertPathEqual(ntpath.realpath("broken5"),
403 self.assertPathEqual(ntpath.realpath(b"broken"),
405 self.assertPathEqual(ntpath.realpath(rb"broken\foo"),
407 self.assertPathEqual(ntpath.realpath(rb"broken1"),
409 self.assertPathEqual(ntpath.realpath(rb"broken1\baz"),
411 self.assertPathEqual(ntpath.realpath(b"broken2"),
413 self.assertPathEqual(ntpath.realpath(rb"broken3"),
415 self.assertPathEqual(ntpath.realpath(b"broken4"),
417 self.assertPathEqual(ntpath.realpath(b"broken5"),
435 self.assertPathEqual(ntpath.realpath(ABSTFN), ABSTFN)
440 self.assertPathIn(ntpath.realpath(ABSTFN + "1"), expected)
441 self.assertPathIn(ntpath.realpath(ABSTFN + "2"), expected)
443 self.assertPathIn(ntpath.realpath(ABSTFN + "1\\x"),
445 self.assertPathEqual(ntpath.realpath(ABSTFN + "1\\.."),
447 self.assertPathEqual(ntpath.realpath(ABSTFN + "1\\..\\x"),
450 self.assertPathEqual(ntpath.realpath(ABSTFN + "1\\..\\"
453 self.assertPathIn(ntpath.realpath(ABSTFN + "1\\..\\"
458 self.assertPathEqual(ntpath.realpath(ABSTFN + "a"), ABSTFN + "a")
462 self.assertPathEqual(ntpath.realpath(ABSTFN + "c"), ABSTFN + "c")
465 self.assertPathEqual(ntpath.realpath(ntpath.basename(ABSTFN)), ABSTFN)
480 self.assertRaises(OSError, ntpath.realpath, ABSTFN, strict=True)
484 self.assertRaises(OSError, ntpath.realpath, ABSTFN + "1", strict=True)
485 self.assertRaises(OSError, ntpath.realpath, ABSTFN + "2", strict=True)
486 self.assertRaises(OSError, ntpath.realpath, ABSTFN + "1\\x", strict=True)
489 self.assertPathEqual(ntpath.realpath(ABSTFN + "1\\..", strict=True),
491 self.assertRaises(OSError, ntpath.realpath, ABSTFN + "1\\..\\x", strict=True)
493 self.assertRaises(OSError, ntpath.realpath, ABSTFN + "1\\..\\"
496 self.assertRaises(OSError, ntpath.realpath,
501 self.assertRaises(OSError, ntpath.realpath, ABSTFN + "a", strict=True)
505 self.assertRaises(OSError, ntpath.realpath, ABSTFN + "c", strict=True)
508 self.assertRaises(OSError, ntpath.realpath, ntpath.basename(ABSTFN),
528 self.assertPathEqual(ntpath.realpath(ABSTFN + "3link"),
530 self.assertPathEqual(ntpath.realpath(ABSTFN + "3.link"),
534 with open(ntpath.realpath(ABSTFN + "3link"), "rb") as f:
536 with open(ntpath.realpath(ABSTFN + "3.link"), "rb") as f:
540 self.assertPathEqual(ntpath.realpath("\\\\?\\" + ABSTFN + "3link"),
542 self.assertPathEqual(ntpath.realpath("\\\\?\\" + ABSTFN + "3.link"),
547 tester("ntpath.realpath('NUL')", r'\\.\NUL')
569 self.assertPathEqual(test_file_long, ntpath.realpath(test_file_short))
572 self.assertPathEqual(test_file_long, ntpath.realpath("file.txt"))
574 self.assertPathEqual(test_file_long, ntpath.realpath("file.txt"))
576 self.assertPathEqual(test_file_long, ntpath.realpath("file.txt"))
962 self._check_function(self.path.realpath)