def test_get_long_path_name_win32(): with TemporaryDirectory() as tmpdir: # Make a long path. Expands the path of tmpdir prematurely as it may already have a long # path component, so ensure we include the long form of it long_path = os.path.join(path.get_long_path_name(tmpdir), 'this is my long path name') os.makedirs(long_path) # Test to see if the short path evaluates correctly. short_path = os.path.join(tmpdir, 'THISIS~1') evaluated_path = path.get_long_path_name(short_path) nt.assert_equal(evaluated_path.lower(), long_path.lower())
def test_get_long_path_name_win32(): with TemporaryDirectory() as tmpdir: # Make a long path. long_path = os.path.join(tmpdir, u'this is my long path name') os.makedirs(long_path) # Test to see if the short path evaluates correctly. short_path = os.path.join(tmpdir, u'THISIS~1') evaluated_path = path.get_long_path_name(short_path) nt.assert_equal(evaluated_path.lower(), long_path.lower())
def test_get_long_path_name(): p = path.get_long_path_name('/usr/local') nt.assert_equal(p,'/usr/local')
def test_get_long_path_name(): p = path.get_long_path_name('/usr/local') nt.assert_equal(p, '/usr/local')
def test_get_long_path_name_win32(): p = path.get_long_path_name('c:\\docume~1') nt.assert_equals(p,u'c:\\Documents and Settings')
def test_get_long_path_name(): p = path.get_long_path_name("/usr/local") nt.assert_equal(p, "/usr/local")
def test_get_long_path_name_win32(): p = path.get_long_path_name("c:\\docume~1") nt.assert_equal(p, u"c:\\Documents and Settings")
def test_get_long_path_name_win32(): p = path.get_long_path_name('c:\\docume~1') nt.assert_equals(p, u'c:\\Documents and Settings')
def test_get_long_path_name(): p = path.get_long_path_name("/usr/local") assert p == "/usr/local"