Skip to content

Commit

Permalink
Idempotency in startingHand unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
LevBernstein committed Sep 8, 2024
1 parent 0837c86 commit 845a045
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.MD
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Beardless Bot

### Full Release 2.4.1 ![Coverage badge](./resources/images/coverage.svg) ![Unit tests badge](./resources/images/tests.svg) ![Docstring coverage badge](./resources/images/docstr-coverage.svg) ![flake8 badge](./resources/images/flake8-badge.svg)
### Full Release 2.4.2 ![Coverage badge](./resources/images/coverage.svg) ![Unit tests badge](./resources/images/tests.svg) ![Docstring coverage badge](./resources/images/docstr-coverage.svg) ![flake8 badge](./resources/images/flake8-badge.svg)

A Discord bot supporting gambling (coin flips and blackjack),
a currency system, fun facts, and more.
Expand Down
5 changes: 5 additions & 0 deletions bb_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1889,9 +1889,14 @@ def test_blackjack_startingHand() -> None:
assert len(game.cards) == 2
assert game.message.startswith("Your starting hand consists of ")

game.cards = []
assert "You hit 21!" in game.startingHand(debugBlackjack=True)
assert len(game.cards) == 2

game.cards = []
assert "two Aces" in game.startingHand(debugDoubleAces=True)
assert len(game.cards) == 2
assert game.cards[1] == 1


def test_activeGame() -> None:
Expand Down
2 changes: 1 addition & 1 deletion bucks.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def startingHand(
Args:
debugBlackjack (bool): Used to test hitting GOAL (default is False)
debugDoubleAces(bool): Used to test dealing two Aces
debugDoubleAces (bool): Used to test dealing two Aces
(default is False)
Returns:
Expand Down

0 comments on commit 845a045

Please sign in to comment.