Answer stability round 1: 0 🔴, 17 🟡 (0 misread); read line ends as before, drop a stale copy, say why a read failed, and test each failure the round named

This commit is contained in:
2026-11-14 00:25:16 +01:00
parent d15380249d
commit b2142ee620
14 changed files with 151 additions and 43 deletions
+1 -11
View File
@@ -1,7 +1,7 @@
"""What every record backend must hold, as tests. A backend's test case inherits RecordStoreContract and unittest.TestCase, and builds its store in new_store."""
import typing
from record_store.stores import held_at, RecordStore
from record_store.stores import RecordStore
class RecordStoreContract:
@@ -30,13 +30,3 @@ class RecordStoreContract:
def test_names_itself_for_a_message(self) -> None:
self.assertTrue(self.new_store().label.strip())
def test_reads_as_it_stands_at_any_revision_where_no_commit_holds_it(self) -> None:
store = self.new_store()
store.write("as it stands\n")
if store.tracked is None:
self.assertEqual(held_at("no-such-revision", store, "/nowhere", run=refuse), "as it stands\n")
def refuse(*args: str, **options: object) -> str:
raise AssertionError(f"git {' '.join(args)} ran for a record no commit holds")