Ejemplo n.º 1
0
def test_join_returns_rooted_path_when_second_path_is_empty():
    fs = FileSystem()
    assert fs.join("/root", "") == '/root/'
Ejemplo n.º 2
0
def test_join_two_paths_when_second_is_virtual():
    fs = FileSystem()
    assert fs.join("/fake", "../dir") == "/fake/../dir"
Ejemplo n.º 3
0
def test_join_returns_empty_string_when_null():
    fs = FileSystem()
    assert fs.join() == ''
Ejemplo n.º 4
0
def test_join_two_paths():
    fs = FileSystem()
    assert fs.join("/fake", "/dir") == "/fake/dir"
Ejemplo n.º 5
0
def test_join_two_paths_when_second_is_not_rooted():
    fs = FileSystem()
    assert fs.join("/fake", "dir") == "/fake/dir"
Ejemplo n.º 6
0
def test_join_many_paths():
    fs = FileSystem()
    assert fs.join("/fake", "/dir", "/other") == "/fake/dir/other"
Ejemplo n.º 7
0
def test_join_single_path():
    fs = FileSystem()
    assert fs.join("/fake") == "/fake"
Ejemplo n.º 8
0
def test_join_returns_empty_string_when_null():
    fs = FileSystem()
    assert fs.join() == ''
Ejemplo n.º 9
0
def test_join_returns_rooted_path_when_second_path_is_empty():
    fs = FileSystem()
    assert fs.join("/root","") == '/root/'
Ejemplo n.º 10
0
def test_join_two_paths_when_second_is_virtual():
    fs = FileSystem()
    assert fs.join("/fake", "../dir") == "/fake/../dir"
Ejemplo n.º 11
0
def test_join_two_paths_when_second_is_not_rooted():
    fs = FileSystem()
    assert fs.join("/fake", "dir") == "/fake/dir"
Ejemplo n.º 12
0
def test_join_two_paths():
    fs = FileSystem()
    assert fs.join("/fake", "/dir") == "/fake/dir"
Ejemplo n.º 13
0
def test_join_single_path():
    fs = FileSystem()
    assert fs.join("/fake") == "/fake"
Ejemplo n.º 14
0
def test_join_many_paths():
    fs = FileSystem()
    assert fs.join("/fake", "/dir", "/other") == "/fake/dir/other"