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"
def test_join_returns_rooted_path_when_second_path_is_empty(): fs = FileSystem() assert fs.join("/root","") == '/root/'