Spaces:
Running
Running
File size: 471 Bytes
bb3fbf9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
from engine.game.player_state import PlayerState
def test_score_is_count_of_lives():
p = PlayerState(0)
# Init
assert p.score == 0
# Add 1 live
p.success_lives.append(1001)
assert p.score == 1
# Add 2 more
p.success_lives.append(1002)
p.success_lives.append(1003)
assert p.score == 3
# Verify it ignores card data (conceptually, though we don't have DB here)
# The property should just be length.
|