示例#1
0
    def test_get_discard_list_equals(self):

        """
        Test that the list returned from get_discard_list() is
        equal to the internal discard list.

        """

        deck = Deck()
        returned_list = deck.get_discard_list()
        self.assertEqual(returned_list, deck._discards)
示例#2
0
    def test_get_discard_list_not_same(self):

        """
        Test that the list returned from get_discard_list() is
        not the same as the internal discard list, i.e. that
        the method is returning a copy.

        """

        deck = Deck()
        returned_list = deck.get_discard_list()
        self.assertFalse(returned_list is deck._discards)