def testpeek(self): ''' Check if the minideck peeks on a card and doesnt pop it. ''' deck = Deck() _minideck1 = Minideck(deck.draw_cards(5)) _minideck2 = _minideck1 self.assertTrue(_minideck1.peek() == _minideck2.peek()) self.assertEqual(5,len(_minideck1.get()))
def testpop(self): ''' Check if the minideck pops a card from it and also check if the poped card is the same from 2 minidecks ''' deck = Deck() _minideck1 = Minideck(deck.draw_cards(5)) _minideck2 = Minideck(deck.draw_cards(5)) self.assertFalse(_minideck1.pop() == _minideck2.pop()) self.assertEqual(4,len(_minideck1.get())) self.assertEqual(4,len(_minideck1.get()))