def test_join_returns_rooted_path_when_second_path_is_empty():
    fs = FileSystem()
    assert fs.join("/root", "") == '/root/'
def test_join_two_paths_when_second_is_virtual():
    fs = FileSystem()
    assert fs.join("/fake", "../dir") == "/fake/../dir"
def test_join_returns_empty_string_when_null():
    fs = FileSystem()
    assert fs.join() == ''
def test_join_two_paths():
    fs = FileSystem()
    assert fs.join("/fake", "/dir") == "/fake/dir"
def test_join_two_paths_when_second_is_not_rooted():
    fs = FileSystem()
    assert fs.join("/fake", "dir") == "/fake/dir"
def test_join_many_paths():
    fs = FileSystem()
    assert fs.join("/fake", "/dir", "/other") == "/fake/dir/other"
def test_join_single_path():
    fs = FileSystem()
    assert fs.join("/fake") == "/fake"
Esempio n. 8
0
def test_join_returns_empty_string_when_null():
    fs = FileSystem()
    assert fs.join() == ''
Esempio n. 9
0
def test_join_returns_rooted_path_when_second_path_is_empty():
    fs = FileSystem()
    assert fs.join("/root","") == '/root/'
Esempio n. 10
0
def test_join_two_paths_when_second_is_virtual():
    fs = FileSystem()
    assert fs.join("/fake", "../dir") == "/fake/../dir"
Esempio n. 11
0
def test_join_two_paths_when_second_is_not_rooted():
    fs = FileSystem()
    assert fs.join("/fake", "dir") == "/fake/dir"
Esempio n. 12
0
def test_join_two_paths():
    fs = FileSystem()
    assert fs.join("/fake", "/dir") == "/fake/dir"
Esempio n. 13
0
def test_join_single_path():
    fs = FileSystem()
    assert fs.join("/fake") == "/fake"
Esempio n. 14
0
def test_join_many_paths():
    fs = FileSystem()
    assert fs.join("/fake", "/dir", "/other") == "/fake/dir/other"