Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

chore: prevent test artifacts from being created (#9074)

Dylan Madisetti437f09999779
diff --git a/.gitignore b/.gitignore
index 535cc2e130..a117d6d11f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -59,9 +59,6 @@ coverage.xml
*.cover
.hypothesis/
.pytest_cache/
-# Cache test artifacts (generated by tests/_save/loaders/test_loader.py)
-P_empty
-P_empty.*
# Translations
*.mo
diff --git a/tests/_save/loaders/test_loader.py b/tests/_save/loaders/test_loader.py
index 7b2f8caf1c..af600b6cb7 100644
--- a/tests/_save/loaders/test_loader.py
+++ b/tests/_save/loaders/test_loader.py
@@ -128,9 +128,8 @@ class ABCTestLoader(ABC):
assert not loader.cache_hit(key("hash1", "Deferred"))
# Empty file should miss
- empty_path = loader.build_path(key("empty", "Pure"))
- empty_path.parent.mkdir(parents=True, exist_ok=True)
- empty_path.write_bytes(b"")
+ empty_key = str(loader.build_path(key("empty", "Pure")))
+ self.store.put(empty_key, b"")
assert not loader.cache_hit(key("empty", "Pure"))
assert loader.hits == 1