mirror of
https://github.com/mwisnowski/mtg_python_deckbuilder.git
synced 2025-12-17 08:00:13 +01:00
test: convert tests to pytest assertions; add server-availability skips; clean up warnings and minor syntax/indent issues
This commit is contained in:
parent
f07daaeb4a
commit
947adacfe2
21 changed files with 374 additions and 311 deletions
|
|
@ -34,10 +34,9 @@ def test_fuzzy_matching_direct():
|
|||
|
||||
if result.matched_name is None and not result.auto_accepted and result.suggestions:
|
||||
print("✅ Fuzzy matching correctly triggered confirmation!")
|
||||
return True
|
||||
else:
|
||||
print("❌ Fuzzy matching should have triggered confirmation")
|
||||
return False
|
||||
assert False
|
||||
|
||||
def test_exact_match_direct():
|
||||
"""Test exact matching directly."""
|
||||
|
|
@ -52,17 +51,16 @@ def test_exact_match_direct():
|
|||
|
||||
result = fuzzy_match_card_name('Lightning Bolt', available_cards)
|
||||
|
||||
print(f"Input: 'Lightning Bolt'")
|
||||
print("Input: 'Lightning Bolt'")
|
||||
print(f"Matched name: {result.matched_name}")
|
||||
print(f"Auto accepted: {result.auto_accepted}")
|
||||
print(f"Confidence: {result.confidence:.2%}")
|
||||
|
||||
if result.matched_name and result.auto_accepted:
|
||||
print("✅ Exact match correctly auto-accepted!")
|
||||
return True
|
||||
else:
|
||||
print("❌ Exact match should have been auto-accepted")
|
||||
return False
|
||||
assert False
|
||||
|
||||
if __name__ == "__main__":
|
||||
print("🧪 Testing Fuzzy Matching Logic")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue