Auto merge dev → main (#1341)
* chore(tally): remove /dev-tally testing command Feature is verified working; drop the dev-only manual win/loss command and its now-unused apply_manual_result helper and test. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * refactor(tally): rename /tally-wipe to /tally-clear Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -133,25 +133,6 @@ def test_squadron_mode_matches_bare_name_despite_resolved_short():
|
||||
assert team_index_for(t, _teams_resolved_mismatch()) == 0
|
||||
|
||||
|
||||
def test_apply_manual_result_win_and_loss():
|
||||
import tempfile
|
||||
import BOT.tally as tal
|
||||
with tempfile.TemporaryDirectory() as d:
|
||||
tal.TALLY_PATH = Path(d) / "TALLY.json"
|
||||
tal._REGISTRY.clear()
|
||||
tal.claim(1, 2, "player", "bravo", "Bravo", user_id=7)
|
||||
win = tal.apply_manual_result(1, 2, "win")
|
||||
assert win is not None
|
||||
assert (win.wins, win.losses) == (1, 0)
|
||||
assert win.last_result_kind == "win" and win.last_opponent == "DEV"
|
||||
loss = tal.apply_manual_result(1, 2, "loss")
|
||||
assert loss is not None
|
||||
assert (loss.wins, loss.losses) == (1, 1)
|
||||
assert loss.last_result_kind == "loss" and loss.last_opponent == "DEV"
|
||||
# No active tally in a different VC → None
|
||||
assert tal.apply_manual_result(1, 999, "win") is None
|
||||
|
||||
|
||||
def _run():
|
||||
fns = [v for k, v in sorted(globals().items()) if k.startswith("test_")]
|
||||
for fn in fns:
|
||||
|
||||
Reference in New Issue
Block a user