holy fuking shit

This commit is contained in:
Horldsence
2026-09-12 01:56:34 +08:00
parent 36f354736c
commit d975309a81
83 changed files with 2748 additions and 896 deletions
+3 -3
View File
@@ -65,7 +65,7 @@ def test_cannot_start_while_running_and_restart_after_finish(tmp_path):
def test_formal_attempts_accounting(tmp_path):
referee = Referee(action_port=0, data_dir=tmp_path)
for _ in range(FORMAL_ATTEMPTS):
session = referee.start("q3_formal", "2026001", countdown_s=0.05)
_session = referee.start("q3_formal", "2026001", countdown_s=0.05)
referee.abort() # 正式中止仍占用机会 [题面 4.5]
with pytest.raises(RefereeError):
referee.start("q3_formal", "2026001", countdown_s=0.05)
@@ -121,7 +121,7 @@ def test_record_action_updates_feed_trail_and_counts(tmp_path):
referee = Referee(action_port=0, data_dir=tmp_path)
session = referee.start("q3_practice", "2026001", countdown_s=0.05, window_s=5)
assert wait_until(lambda: session.phase == "open")
sim = session.simulator
_sim = session.simulator
referee.record_action(session, "POST", "/measure",
{"request_id": "m1", "position": {"x": 5000, "y": 0},
"channel": 1},
@@ -168,7 +168,7 @@ def test_display_limit_and_port_settings(tmp_path):
referee.set_display_limit(50)
with pytest.raises(RefereeError):
referee.set_display_limit(5001)
session = referee.start("q3_practice", "2026001", countdown_s=5)
_session = referee.start("q3_practice", "2026001", countdown_s=5)
with pytest.raises(RefereeError):
referee.set_action_port(8080) # 测试进行中不能改端口
referee.abort()