Repository navigation
v2.4.2 - Test Suite Fixes
Release 2.4.2: Complete Test Suite Fixes
All test suites now passing at 100%!
Test Results
- ✅ Integration tests: 43/43 passing (100%)
- ✅ Command tests: 292/292 working (100%)
- ✅ Mobprog scenario tests: 7/7 passing (100%)
Fixes
Mobprog Integration Tests
- test_quest_completion_workflow: Fixed
run_prog()call to usearg1parameter instead ofobj - test_mob_casts_spell_at_low_health:
- Corrected HP threshold (29 vs 30) to account for
<comparison in HPCNT trigger - Fixed mock to intercept
mob_cmds.mob_interpret()instead ofdispatcher.process_command()
- Corrected HP threshold (29 vs 30) to account for
- test_guard_chain_reaction:
- Added RNG mock to ensure greet trigger fires consistently
- Fixed phrase matching by lowercasing (case-sensitive comparison)
Command Test Fixtures
- Added missing room methods:
add_character(),remove_character() - Added missing room attributes:
contents,board_name - Added all 6 exit directions with proper target rooms
- Added missing PCData attributes:
last_notes,board_name
Technical Details
Mobprog API Corrections:
run_prog()signature usesarg1for objects, notobj(seemud/mobprog.py:1248-1256)- Mob commands route through
mob_cmds.mob_interpret(), notdispatcher.process_command()(seemud/mobprog.py:1122)
HPCNT Trigger Logic:
- Trigger fires when
percent < threshold, so 30% HP doesn't trigger with threshold "30" (seemud/mobprog.py:1504)
Speech Trigger Matching:
- Phrase matching is case-sensitive:
"halt" in "Halt!"returns False (seemud/mobprog.py:1238)
Verification
pytest tests/integration/ -v # 43 passed
python3 test_all_commands.py # 292/292 working
pytest tests/test_mobprog.py -v # 45 passedFiles Changed
tests/integration/test_mobprog_scenarios.pytest_all_commands.pypyproject.toml(version bump)README.md(version badge)
Full Changelog: v2.4.1...v2.4.2