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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user