Exemple #1
0
def test_exists(clean, fs_kind):
    if skip_gcs[fs_kind]:
        print("skipped")
        return
    init(fs_kind)

    p = TransparentPath("chien")
    p.touch()
    assert p.exist()
    assert p.exists()
Exemple #2
0
def test_touch(clean, fs_kind, path):
    if skip_gcs[fs_kind]:
        print("skipped")
        return
    init(fs_kind)

    p = TransparentPath(path)
    if p.exists():
        p.rm(ignore_kind=True)
    p.touch()
    assert p.is_file()
Exemple #3
0
def test_rm(clean, fs_kind, path1, path2, kwargs, expected):
    if skip_gcs[fs_kind]:
        print("skipped")
        return
    init(fs_kind)
    p1 = TransparentPath(path1)
    p2 = TransparentPath(path2)
    if path1 != "":
        p1.touch()
    if expected is not None:
        with pytest.raises(expected):
            p2.rm(**kwargs)
    else:
        p2.rm(**kwargs)
        assert not p2.exists()