示例#1
0
def test_is_skippable_dne() -> None:
    _teardown()
    TMP_ROOT.mkdir()
    path = TMP_ROOT / "test.txt"
    settings = Settings()
    wob = Walk(settings)
    res = wob._is_skippable(path)
    assert res
    _teardown()
示例#2
0
def test_is_skippable_unset() -> None:
    _teardown()
    TMP_ROOT.mkdir()
    path = TMP_ROOT / "test.txt"
    path.touch()
    settings = Settings()
    wob = Walk(settings)
    res = wob._is_skippable(path)
    assert not res
    _teardown()
示例#3
0
def test_is_skippable_timestamp() -> None:
    _teardown()
    TMP_ROOT.mkdir()
    path = TMP_ROOT / RECORD_FILENAME
    path.touch()
    settings = Settings()
    wob = Walk(settings)
    res = wob._is_skippable(path)
    assert res
    _teardown()
示例#4
0
def test_is_skippable_symlink() -> None:
    _teardown()
    TMP_ROOT.mkdir()
    path = TMP_ROOT / "test.txt"
    path.symlink_to(TMP_ROOT)
    settings = Settings()
    settings.follow_symlinks = False
    wob = Walk(settings)
    res = wob._is_skippable(path)
    assert res
    _teardown()