def test_backtrack(temp_cache): s = TextFilesSource("*.py") s2 = s.persist() s3 = store.backtrack(s2) assert s3 == s
def test_persist_with_nonnumeric_ttl_raises_error(temp_cache): s = TextFilesSource("*.py") with pytest.raises(ValueError, match="User-provided ttl was a string"): s.persist(ttl='a string')