def test_shuffle_randomizes_deck(self): game_test = Anjc() deck_one = game_test.create_deck() deck_one = game_test.shuffle_deck(deck_one) deck_two = game_test.create_deck() deck_two = game_test.shuffle_deck(deck_two) self.assertNotEqual(str(deck_one), str(deck_two), "Karte su promiješane")
def test_does_a_new_card_get_added_in_hand(self): game_test = Anjc() deck = game_test.create_deck() hand = game_test.deal_card(deck) self.assertEqual(len(hand), 1, "Imam jednu kartu u ruci") hand = game_test.add_card_in_hand(hand, deck) self.assertEqual(len(hand), 2, "Imam dvije karte u ruci")
def test_deal_removes_a_card(self): game_test = Anjc() deck = game_test.create_deck() inital_deck_num = len(deck) card = game_test.deal_card(deck) after_deal_deck_num = len(deck) self.assertEqual(inital_deck_num, after_deal_deck_num + 1, "Miče se jedna karta iz decka")
def test_size_of_deck(self): game_test = Anjc() deck = game_test.create_deck() self.assertEqual(len(deck), 52, "Deck ima 52 karte")