fix: re-vérifier db_path.exists() dans le handler et assertion return value (#78)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Colin Maudry
2026-06-12 13:50:57 +02:00
parent bba53d81e1
commit fa2709b38c
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -340,7 +340,8 @@ def test_ensure_database_reuses_db_when_build_raises(tmp_path, monkeypatch):
monkeypatch.setenv("DATA_FILE_PARQUET_PATH", "http://unreachable")
monkeypatch.setattr(db, "should_rebuild", lambda *a, **k: True)
monkeypatch.setattr(db, "build_database", _raise)
db._ensure_database() # ne doit pas lever
result = db._ensure_database() # ne doit pas lever
assert result == dbf
assert dbf.read_bytes() == b"existing"