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"
Exemple #8
0
def test_join_returns_empty_string_when_null():
    fs = FileSystem()
    assert fs.join() == ''
Exemple #9
0
def test_join_returns_rooted_path_when_second_path_is_empty():
    fs = FileSystem()
    assert fs.join("/root","") == '/root/'
Exemple #10
0
def test_join_two_paths_when_second_is_virtual():
    fs = FileSystem()
    assert fs.join("/fake", "../dir") == "/fake/../dir"
Exemple #11
0
def test_join_two_paths_when_second_is_not_rooted():
    fs = FileSystem()
    assert fs.join("/fake", "dir") == "/fake/dir"
Exemple #12
0
def test_join_two_paths():
    fs = FileSystem()
    assert fs.join("/fake", "/dir") == "/fake/dir"
Exemple #13
0
def test_join_single_path():
    fs = FileSystem()
    assert fs.join("/fake") == "/fake"
Exemple #14
0
def test_join_many_paths():
    fs = FileSystem()
    assert fs.join("/fake", "/dir", "/other") == "/fake/dir/other"