Check observed collection clocks before labeling fields

This commit is contained in:
Frank14f committed 2026-11-03 01:18:56 +08:00
1 parent 63e5c3828b
commit aafa05a359
2 files changed
+11

No files matched your search

+5
View File
@@ -182,6 +182,11 @@ class CollectionContracts(unittest.TestCase):
class SelectionContracts(unittest.TestCase):
def test_recorded_clock_must_equal_observed_solver(self):
driver.check_clock(types.SimpleNamespace(step_count=4579200),4576000,3200)
with self.assertRaisesRegex(RuntimeError,'observed solver clock'):
driver.check_clock(types.SimpleNamespace(step_count=4579201),4576000,3200)
@staticmethod
def mean(ux, uy, indices):
return dict(mean_ux=ux[indices].mean(axis=0), mean_uy=uy[indices].mean(axis=0))