Lines Matching refs:relpath
376 os.symlink(posixpath.relpath(ABSTFN+"1"), ABSTFN)
573 self.assertRaises(ValueError, posixpath.relpath, "")
574 self.assertEqual(posixpath.relpath("a"), "a")
575 self.assertEqual(posixpath.relpath(posixpath.abspath("a")), "a")
576 self.assertEqual(posixpath.relpath("a/b"), "a/b")
577 self.assertEqual(posixpath.relpath("../a/b"), "../a/b")
578 self.assertEqual(posixpath.relpath("a", "../b"), "../"+curdir+"/a")
579 self.assertEqual(posixpath.relpath("a/b", "../c"),
581 self.assertEqual(posixpath.relpath("a", "b/c"), "../../a")
582 self.assertEqual(posixpath.relpath("a", "a"), ".")
583 self.assertEqual(posixpath.relpath("/foo/bar/bat", "/x/y/z"), '../../../foo/bar/bat')
584 self.assertEqual(posixpath.relpath("/foo/bar/bat", "/foo/bar"), 'bat')
585 self.assertEqual(posixpath.relpath("/foo/bar/bat", "/"), 'foo/bar/bat')
586 self.assertEqual(posixpath.relpath("/", "/foo/bar/bat"), '../../..')
587 self.assertEqual(posixpath.relpath("/foo/bar/bat", "/x"), '../foo/bar/bat')
588 self.assertEqual(posixpath.relpath("/x", "/foo/bar/bat"), '../../../x')
589 self.assertEqual(posixpath.relpath("/", "/"), '.')
590 self.assertEqual(posixpath.relpath("/a", "/a"), '.')
591 self.assertEqual(posixpath.relpath("/a/b", "/a/b"), '.')
599 self.assertRaises(ValueError, posixpath.relpath, b"")
600 self.assertEqual(posixpath.relpath(b"a"), b"a")
601 self.assertEqual(posixpath.relpath(posixpath.abspath(b"a")), b"a")
602 self.assertEqual(posixpath.relpath(b"a/b"), b"a/b")
603 self.assertEqual(posixpath.relpath(b"../a/b"), b"../a/b")
604 self.assertEqual(posixpath.relpath(b"a", b"../b"),
606 self.assertEqual(posixpath.relpath(b"a/b", b"../c"),
608 self.assertEqual(posixpath.relpath(b"a", b"b/c"), b"../../a")
609 self.assertEqual(posixpath.relpath(b"a", b"a"), b".")
610 self.assertEqual(posixpath.relpath(b"/foo/bar/bat", b"/x/y/z"), b'../../../foo/bar/bat')
611 self.assertEqual(posixpath.relpath(b"/foo/bar/bat", b"/foo/bar"), b'bat')
612 self.assertEqual(posixpath.relpath(b"/foo/bar/bat", b"/"), b'foo/bar/bat')
613 self.assertEqual(posixpath.relpath(b"/", b"/foo/bar/bat"), b'../../..')
614 self.assertEqual(posixpath.relpath(b"/foo/bar/bat", b"/x"), b'../foo/bar/bat')
615 self.assertEqual(posixpath.relpath(b"/x", b"/foo/bar/bat"), b'../../../x')
616 self.assertEqual(posixpath.relpath(b"/", b"/"), b'.')
617 self.assertEqual(posixpath.relpath(b"/a", b"/a"), b'.')
618 self.assertEqual(posixpath.relpath(b"/a/b", b"/a/b"), b'.')
620 self.assertRaises(TypeError, posixpath.relpath, b"bytes", "str")
621 self.assertRaises(TypeError, posixpath.relpath, "str", b"bytes")
749 self.assertPathEqual(self.path.relpath)