Refine ranch tree, growth sync and monitoring policies

This commit is contained in:
AttilaNet
2026-11-08 09:53:02 +08:00
parent a37627b490
commit 9611a3413f
24 changed files with 640 additions and 1227 deletions
+2 -2
View File
@@ -54,7 +54,7 @@ class ResponsivenessTests(unittest.TestCase):
snapshot = demo_snapshot(window.catalog)
template = snapshot.raw["monsters"][-1]
snapshot.raw["monsters"] = [copy.deepcopy(template) | {"id": 1000 + i} for i in range(500)]
with patch.object(window.monsters, "setCellWidget") as cells:
with patch.object(window.monsters, "setItemWidget") as cells:
window.engine.snapshot = snapshot
window.render(snapshot, [])
self.assertEqual(cells.call_count, 0)
@@ -171,7 +171,7 @@ class ResponsivenessTests(unittest.TestCase):
break
self.assertFalse(any(w.busy for w in windows))
self.assertEqual(windows[0].eggs.rowCount(), 200)
self.assertEqual(windows[1].monsters.rowCount(), 0)
self.assertEqual(len(windows[1].monsters.monster_items), 0)
self.assertGreater(len(beats), 10)
self.assertLess(max(b - a for a, b in zip(beats, beats[1:])), .25)
self.assertTrue(any(e["operation"] == "刷新耗时" for e in windows[0].trace.events))