Example #1
0
 def test_length(self):
     """
     Testing if the reported length is correct.
     :return:
     """
     d = deck.Deck()
     tools.assert_equal(len(d), 108)
Example #2
0
 def test_init(self):
     """
     Testing the Initialization
     :return:
     """
     d = deck.Deck()
     tools.assert_is_instance(d, deck.Deck)
Example #3
0
 def test_remaining_cards(self):
     """
     Testing if a correct number of remaining cards is reported
     :return:
     """
     d = deck.Deck()
     d.draw_four_cards()
     tools.assert_equal(d.remaining_cards(), 104)
Example #4
0
 def test_draw_two(self):
     """
     Testing if a correct number of cards is drawn
     :return:
     """
     d = deck.Deck()
     d.draw_two_cards()
     tools.assert_equal(len(d), 106)
     tools.assert_equal(d.remaining_cards(), 106)
Example #5
0
 def test_initial_deal(self):
     """
     Testing if a correct number of cards is drawn
     :return:
     """
     d = deck.Deck()
     d.initial_deal()
     tools.assert_equal(len(d), 101)
     tools.assert_equal(d.remaining_cards(), 101)
Example #6
0
 def test_draw_two_cards_result(self):
     d = deck.Deck()
     ret = d.draw_two_cards()
     tools.assert_list_equal(list(ret), self.two_card_draw)
     tools.assert_is_instance(ret, deque)
Example #7
0
 def test_initial_deal_result(self):
     d = deck.Deck()
     ret = d.initial_deal()
     tools.assert_list_equal(list(ret), self.initial_deal)
     tools.assert_is_instance(ret, deque)