Skip to content

Commit

Permalink
Merge pull request #1 from donat-konan33/dictionary-api
Browse files Browse the repository at this point in the history
TDD: Check that attempt exists in the English dictionary
  • Loading branch information
donat-konan33 authored Oct 9, 2024
2 parents 701feec + 51e71d4 commit ef3f397
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_game.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,11 @@ def test_is_invalid(self):
assert new_game.is_valid(test_word) is False
# teardown
assert new_game.grid == list(test_grid) # Make sure the grid remained untouched

# tests/test_game.py
# [...]
def test_unknown_word_is_invalid(self):
"""A word that is not in the English dictionary should not be valid"""
new_game = Game()
new_game.grid = list('KWIENFUQW') # Force the grid to a test case:
assert new_game.is_valid('FEUN') is False

0 comments on commit ef3f397

Please sign in to comment.