mirror of
https://github.com/mwisnowski/mtg_python_deckbuilder.git
synced 2025-12-17 08:00:13 +01:00
feat: complete include/exclude observability, fix validation bugs, and organize tests
- Add structured logging for include/exclude operations with comprehensive event tracking - Fix duplicate counting bug in validation API by eliminating double validation passes - Simplify color identity validation UX by consolidating into single 'illegal' status - Organize project structure by moving all test files to centralized code/tests/ directory - Update documentation reflecting feature completion and production readiness - Add validation test scripts and performance benchmarks confirming targets met - Finalize include/exclude feature as production-ready with EDH format compliance
This commit is contained in:
parent
f77bce14cb
commit
3e4395d6e9
32 changed files with 470 additions and 89 deletions
43
code/tests/test_exclude_integration.py
Normal file
43
code/tests/test_exclude_integration.py
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
#!/usr/bin/env python3
|
||||
"""
|
||||
Test script to verify exclude functionality integration.
|
||||
This is a quick integration test for M0.5 implementation.
|
||||
"""
|
||||
|
||||
import sys
|
||||
import os
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'code'))
|
||||
|
||||
from code.deck_builder.include_exclude_utils import parse_card_list_input
|
||||
from code.deck_builder.builder import DeckBuilder
|
||||
|
||||
def test_exclude_integration():
|
||||
"""Test that exclude functionality works end-to-end."""
|
||||
print("=== M0.5 Exclude Integration Test ===")
|
||||
|
||||
# Test 1: Parse exclude list
|
||||
print("\n1. Testing card list parsing...")
|
||||
exclude_input = "Sol Ring\nRhystic Study\nSmothering Tithe"
|
||||
exclude_list = parse_card_list_input(exclude_input)
|
||||
print(f" Input: {repr(exclude_input)}")
|
||||
print(f" Parsed: {exclude_list}")
|
||||
assert len(exclude_list) == 3
|
||||
assert "Sol Ring" in exclude_list
|
||||
print(" ✓ Parsing works")
|
||||
|
||||
# Test 2: Check DeckBuilder has the exclude attribute
|
||||
print("\n2. Testing DeckBuilder exclude attribute...")
|
||||
builder = DeckBuilder(headless=True, output_func=lambda x: None, input_func=lambda x: "")
|
||||
|
||||
# Set exclude cards
|
||||
builder.exclude_cards = exclude_list
|
||||
print(f" Set exclude_cards: {builder.exclude_cards}")
|
||||
assert hasattr(builder, 'exclude_cards')
|
||||
assert builder.exclude_cards == exclude_list
|
||||
print(" ✓ DeckBuilder accepts exclude_cards attribute")
|
||||
|
||||
print("\n=== All tests passed! ===")
|
||||
print("M0.5 exclude functionality is ready for testing.")
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_exclude_integration()
|
||||
Loading…
Add table
Add a link
Reference in a new issue