示例#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())
示例#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())
示例#3
0
文件: test_path.py 项目: ANB2/ipython
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())
示例#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())
示例#5
0
def test_get_long_path_name():
    p = path.get_long_path_name('/usr/local')
    nt.assert_equal(p,'/usr/local')
示例#6
0
def test_get_long_path_name():
    p = path.get_long_path_name('/usr/local')
    nt.assert_equal(p, '/usr/local')
示例#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') 
示例#8
0
def test_get_long_path_name():
    p = path.get_long_path_name("/usr/local")
    nt.assert_equal(p, "/usr/local")
示例#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")
示例#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')
示例#11
0
def test_get_long_path_name():
    p = path.get_long_path_name("/usr/local")
    assert p == "/usr/local"
示例#12
0
def test_get_long_path_name():
    p = path.get_long_path_name("/usr/local")
    nt.assert_equal(p, "/usr/local")