tests: main's Python suite passes again (perf_bench fixture, trusted reviewers)

- test_table_distinguishes_missing_scene_load_from_zero: #4407's later
  commit makes table() refuse reports without matching conditions, so its
  fixtures now carry the same full conditions as the contract tests.
- test_the_repos_list_is_the_nightlys: the list names Qwerner88880 since
  f35210d2d; 10c71a65d updated test_nightly_set but not this test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Ludovic MarieandClaude Opus 5.5 committed 2026-10-31 19:20:13 +01:00
1 parent f351b64659
commit 72fabfede5
2 files changed
+5 -2

No files matched your search

+4 -1
View File
@@ -135,6 +135,9 @@ class PerfBenchStatsTests(unittest.TestCase):
root = Path(tmp)
reports = root / "benchmarks" / "perf"
reports.mkdir(parents=True)
# Comparable runs: table() refuses reports whose conditions differ or are missing.
conditions = {"scenario": "flight", "seed": "1234", "render_distance": 8, "simulation_distance": 12,
"window": [1920, 1080], "vsync": False, "offscreen": False}
for label, metrics in (
("missing", {}),
("zero", {"chunks.village.load_ms": {"mean": 0}}),
@@ -142,7 +145,7 @@ class PerfBenchStatsTests(unittest.TestCase):
"chunks.forest.load_ms": {"mean": 3000}}),
):
(reports / f"{label}-rd8.json").write_text(
json.dumps({"conditions": {"render_distance": 8}, "metrics": metrics}), encoding="utf-8")
json.dumps({"conditions": conditions, "metrics": metrics}), encoding="utf-8")
output = io.StringIO()
with mock.patch.object(pb, "ROOT", root), contextlib.redirect_stdout(output):
pb.table(["missing", "zero", "measured"])
+1 -1
View File
@@ -104,7 +104,7 @@ class AllowTests(unittest.TestCase):
def test_the_repos_list_is_the_nightlys(self):
self.assertEqual(ns.REVIEWERS, ".github/trusted-reviewers.txt")
listed = ns.read_reviewers((ROOT / ns.REVIEWERS).read_text())
self.assertEqual(listed.logins, {"kacpherek", "rdbtcvs", "online5277", "levzzz5154"})
self.assertEqual(listed.logins, {"kacpherek", "rdbtcvs", "online5277", "levzzz5154", "qwerner88880"})
self.assertFalse(listed.paused)