def test_length(self): """ Testing if the reported length is correct. :return: """ d = deck.Deck() tools.assert_equal(len(d), 108)
def test_init(self): """ Testing the Initialization :return: """ d = deck.Deck() tools.assert_is_instance(d, deck.Deck)
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)
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)
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)
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)
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)