Ejemplo n.º 1
0
def test_full_path_win32():
    spath = "c:\\foo\\bar.py"
    result = tt.full_path(spath, ["a.txt", "b.txt"])
    assert result, ["c:\\foo\\a.txt" == "c:\\foo\\b.txt"]
    spath = "c:\\foo"
    result = tt.full_path(spath, ["a.txt", "b.txt"])
    assert result, ["c:\\a.txt" == "c:\\b.txt"]
    result = tt.full_path(spath, "a.txt")
    assert result == ["c:\\a.txt"]
Ejemplo n.º 2
0
def test_full_path_win32():
    spath = 'c:\\foo\\bar.py'
    result = tt.full_path(spath, ['a.txt', 'b.txt'])
    nt.assert_equal(result, ['c:\\foo\\a.txt', 'c:\\foo\\b.txt'])
    spath = 'c:\\foo'
    result = tt.full_path(spath, ['a.txt', 'b.txt'])
    nt.assert_equal(result, ['c:\\a.txt', 'c:\\b.txt'])
    result = tt.full_path(spath, 'a.txt')
    nt.assert_equal(result, ['c:\\a.txt'])
Ejemplo n.º 3
0
def test_full_path_posix():
    spath = "/foo/bar.py"
    result = tt.full_path(spath, ["a.txt", "b.txt"])
    assert result, ["/foo/a.txt" == "/foo/b.txt"]
    spath = "/foo"
    result = tt.full_path(spath, ["a.txt", "b.txt"])
    assert result, ["/a.txt" == "/b.txt"]
    result = tt.full_path(spath, "a.txt")
    assert result == ["/a.txt"]
Ejemplo n.º 4
0
def test_full_path_win32():
    spath = "c:\\foo\\bar.py"
    result = tt.full_path(spath, ["a.txt", "b.txt"])
    nt.assert_equal(result, ["c:\\foo\\a.txt", "c:\\foo\\b.txt"])
    spath = "c:\\foo"
    result = tt.full_path(spath, ["a.txt", "b.txt"])
    nt.assert_equal(result, ["c:\\a.txt", "c:\\b.txt"])
    result = tt.full_path(spath, "a.txt")
    nt.assert_equal(result, ["c:\\a.txt"])
Ejemplo n.º 5
0
def test_full_path_posix():
    spath = '/foo/bar.py'
    result = tt.full_path(spath, ['a.txt', 'b.txt'])
    nt.assert_equal(result, ['/foo/a.txt', '/foo/b.txt'])
    spath = '/foo'
    result = tt.full_path(spath, ['a.txt', 'b.txt'])
    nt.assert_equal(result, ['/a.txt', '/b.txt'])
    result = tt.full_path(spath, 'a.txt')
    nt.assert_equal(result, ['/a.txt'])
Ejemplo n.º 6
0
def test_full_path_posix():
    spath = "/foo/bar.py"
    result = tt.full_path(spath, ["a.txt", "b.txt"])
    nt.assert_equal(result, ["/foo/a.txt", "/foo/b.txt"])
    spath = "/foo"
    result = tt.full_path(spath, ["a.txt", "b.txt"])
    nt.assert_equal(result, ["/a.txt", "/b.txt"])
    result = tt.full_path(spath, "a.txt")
    nt.assert_equal(result, ["/a.txt"])
Ejemplo n.º 7
0
def test_full_path_win32():
    spath = 'c:\\foo\\bar.py'
    result = tt.full_path(spath,['a.txt','b.txt'])
    nt.assert_equal(result, ['c:\\foo\\a.txt', 'c:\\foo\\b.txt'])
    spath = 'c:\\foo'
    result = tt.full_path(spath,['a.txt','b.txt'])
    nt.assert_equal(result, ['c:\\a.txt', 'c:\\b.txt'])
    result = tt.full_path(spath,'a.txt')
    nt.assert_equal(result, ['c:\\a.txt'])
Ejemplo n.º 8
0
def test_full_path_posix():
    spath = '/foo/bar.py'
    result = tt.full_path(spath,['a.txt','b.txt'])
    nt.assert_equal(result, ['/foo/a.txt', '/foo/b.txt'])
    spath = '/foo'
    result = tt.full_path(spath,['a.txt','b.txt'])
    nt.assert_equal(result, ['/a.txt', '/b.txt'])
    result = tt.full_path(spath,'a.txt')
    nt.assert_equal(result, ['/a.txt'])
Ejemplo n.º 9
0
def test_full_path_win32():
    spath = "c:\\foo\\bar.py"
    result = tt.full_path(spath, ["a.txt", "b.txt"])
    nt.assert_equal(result, ["c:\\foo\\a.txt", "c:\\foo\\b.txt"])
    spath = "c:\\foo"
    result = tt.full_path(spath, ["a.txt", "b.txt"])
    nt.assert_equal(result, ["c:\\a.txt", "c:\\b.txt"])
    result = tt.full_path(spath, "a.txt")
    nt.assert_equal(result, ["c:\\a.txt"])
Ejemplo n.º 10
0
def test_full_path_posix():
    spath = "/foo/bar.py"
    result = tt.full_path(spath, ["a.txt", "b.txt"])
    nt.assert_equal(result, ["/foo/a.txt", "/foo/b.txt"])
    spath = "/foo"
    result = tt.full_path(spath, ["a.txt", "b.txt"])
    nt.assert_equal(result, ["/a.txt", "/b.txt"])
    result = tt.full_path(spath, "a.txt")
    nt.assert_equal(result, ["/a.txt"])