

def test_relpath(self):
    currentdir = os.path.split(os.getcwd())[(- 1)]
    tester('ntpath.relpath("a")', 'a')
    tester('ntpath.relpath(os.path.abspath("a"))', 'a')
    tester('ntpath.relpath("a/b")', 'a\\b')
    tester('ntpath.relpath("../a/b")', '..\\a\\b')
    tester('ntpath.relpath("a", "../b")', (('..\\' + currentdir) + '\\a'))
    tester('ntpath.relpath("a/b", "../c")', (('..\\' + currentdir) + '\\a\\b'))
    tester('ntpath.relpath("a", "b/c")', '..\\..\\a')
    tester('ntpath.relpath("c:/foo/bar/bat", "c:/x/y")', '..\\..\\foo\\bar\\bat')
    tester('ntpath.relpath("//conky/mountpoint/a", "//conky/mountpoint/b/c")', '..\\..\\a')
    tester('ntpath.relpath("a", "a")', '.')
    tester('ntpath.relpath("/foo/bar/bat", "/x/y/z")', '..\\..\\..\\foo\\bar\\bat')
    tester('ntpath.relpath("/foo/bar/bat", "/foo/bar")', 'bat')
    tester('ntpath.relpath("/foo/bar/bat", "/")', 'foo\\bar\\bat')
    tester('ntpath.relpath("/", "/foo/bar/bat")', '..\\..\\..')
    tester('ntpath.relpath("/foo/bar/bat", "/x")', '..\\foo\\bar\\bat')
    tester('ntpath.relpath("/x", "/foo/bar/bat")', '..\\..\\..\\x')
    tester('ntpath.relpath("/", "/")', '.')
    tester('ntpath.relpath("/a", "/a")', '.')
    tester('ntpath.relpath("/a/b", "/a/b")', '.')
    tester('ntpath.relpath("c:/foo", "C:/FOO")', '.')

dataset/ETHPy150Open amrdraz/kodr/app/brython/www/src/Lib/test/test_ntpath.py TestNtpath.test_relpath/original