-
Notifications
You must be signed in to change notification settings - Fork 1
/
injustice_test.py
21 lines (19 loc) · 964 Bytes
/
injustice_test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# not testing the command, but rather running the judge over multiple
# game logs (likely already cached) to make sure that it doesn't crash
# and output things like "KeyError(15)" to the Discord users.
from unit_test_imports import links
import asyncio
from ext.InjusticeJudge.utilities import analyze_game
async def test_injustice():
# this took me so long to debug... I tried to make my own AccountManager, while
# `utilities.py` was using the one from `global_stuff`... UGH.
# uncomment the two lines below if the games are not cached yet
from global_stuff import account_manager, load_mjs_account_manager
await load_mjs_account_manager()
print("===============================")
for reason, link in links.items():
print("reason: ", reason, "\n-----------")
for injustice in (await analyze_game(link))[0]:
print(injustice)
print("===============================")
asyncio.run(test_injustice())