test: add unit tests for models, payout logic, and room lock
- test_models.py: 10 tests for Room/Horse/Bet/RaceResult dataclasses - test_payout_logic.py: 12 tests for payout formula (max+round) - test_room_store_lock.py: 5 tests for get_lock() setdefault pattern - All 34 tests pass in 0.27s
This commit is contained in:
8
tests/conftest.py
Normal file
8
tests/conftest.py
Normal file
@@ -0,0 +1,8 @@
|
||||
"""Test configuration - add project root to sys.path."""
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
# Add project root so `danding_bot` can be imported
|
||||
project_root = Path(__file__).parent.parent
|
||||
if str(project_root) not in sys.path:
|
||||
sys.path.insert(0, str(project_root))
|
||||
Reference in New Issue
Block a user