This commit is contained in:
NotSoToothless
2026-06-18 02:39:21 -07:00
committed by GitHub
parent 32e747212f
commit d490c1c8d5
4 changed files with 41 additions and 11 deletions
+8 -1
View File
@@ -4,7 +4,7 @@ import pathlib
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[2] / "SHARED"))
from BOT.match_logs import build_match_logs
from BOT.match_logs import build_event_log, build_match_logs
def _game():
@@ -53,8 +53,15 @@ def test_events_base85_zstd_compressed():
assert battle and "destroyed" in battle[0]
def test_event_log_preserves_kill_victim_unit():
event_log = build_event_log(_game())
assert event_log["kills"][0]["offended_uid"] == 2
assert event_log["kills"][0]["offended_unit"] == "germ_pz_iv"
if __name__ == "__main__":
test_chat_log_format()
test_battle_log_kill_prefix_and_text()
test_events_base85_zstd_compressed()
test_event_log_preserves_kill_victim_unit()
print("ALL TESTS PASSED")