added test for Player()

This commit is contained in:
2025-11-06 20:00:22 +01:00
parent 4222e76262
commit a3aa761739

28
tests/test_player.py Normal file
View File

@@ -0,0 +1,28 @@
import pytest
from pyjack.player import Player
from pyjack.deck import Deck
# Start Fixtures
@pytest.fixture
def player() -> Player:
"""Fixture for the player test."""
player = Player(0)
return player
@pytest.fixture
def deck() -> Deck:
deck = Deck()
return deck
# Start Tests:
def test_player_hit_one_card(player, deck):
player.hit(deck)
assert len(player.hand.cards) == 1