Beispiel #1
0
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())
Beispiel #2
0
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())
Beispiel #3
0
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())
Beispiel #4
0
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())
Beispiel #5
0
def test_get_long_path_name():
    p = path.get_long_path_name('/usr/local')
    nt.assert_equal(p,'/usr/local')
Beispiel #6
0
def test_get_long_path_name():
    p = path.get_long_path_name('/usr/local')
    nt.assert_equal(p, '/usr/local')
Beispiel #7
0
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') 
Beispiel #8
0
def test_get_long_path_name():
    p = path.get_long_path_name("/usr/local")
    nt.assert_equal(p, "/usr/local")
Beispiel #9
0
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")
Beispiel #10
0
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')
Beispiel #11
0
def test_get_long_path_name():
    p = path.get_long_path_name("/usr/local")
    assert p == "/usr/local"
Beispiel #12
0
def test_get_long_path_name():
    p = path.get_long_path_name("/usr/local")
    nt.assert_equal(p, "/usr/local")