def test_two_pair(self): cards = [hm.Card(3,3),hm.Card(3,2),hm.Card(5,1),hm.Card(5,4),hm.Card(9,1),hm.Card(11,2),hm.Card(2,3)] cards.sort(key= lambda hand: hand.pic) hv = hm.Hand_Value() sames = hm.get_sames(cards) hm.check_max_same(sames,hv) boool = hv.twopair_high_value==5 and hv.twopair_low_value==3 self.assertTrue(boool)
def test_pair(self): cards = [hm.Card(12,3),hm.Card(4,2),hm.Card(5,1),hm.Card(5,4),hm.Card(9,1),hm.Card(11,2),hm.Card(2,3)] cards.sort(key= lambda hand: hand.pic) hv = hm.Hand_Value() sames = hm.get_sames(cards) hm.check_max_same(sames,hv) boool = hv.pair_value==5 self.assertTrue(boool)
def test_full_house(self): cards = [hm.Card(9,3),hm.Card(5,2),hm.Card(5,1),hm.Card(5,4),hm.Card(9,1),hm.Card(11,2),hm.Card(2,3)] cards.sort(key= lambda hand: hand.pic) hv = hm.Hand_Value() sames = hm.get_sames(cards) hm.check_max_same(sames,hv) boool = hv.fullhouse_trip_value==5 and hv.fullhouse_pair_value==9 self.assertTrue(boool)