Beispiel #1
0
def test_can_remove_dot_segments_when_starts_with_double_dot():
    path_in = Path("../a")
    path_out = path_in.remove_dot_segments()
    assert path_out == "a"
Beispiel #2
0
def test_can_remove_dot_segments_pattern_2():
    path_in = Path("mid/content=5/../6")
    path_out = path_in.remove_dot_segments()
    assert path_out == "mid/6"
Beispiel #3
0
def test_can_remove_dot_segments_when_single_dot():
    path_in = Path(".")
    path_out = path_in.remove_dot_segments()
    assert path_out == ""
Beispiel #4
0
def test_can_remove_dot_segments_pattern_1():
    path_in = Path("/a/b/c/./../../g")
    path_out = path_in.remove_dot_segments()
    assert path_out == "/a/g"