def test_flush_pair_in_hand(self): # Border case where there's a pair in hand. hand1 = Hand(**self._flush_high_card_pair1) hand2 = Hand(**self._flush_high_card_pair2) high1, low1 = hand1.has_flush_draw() high2, low2 = hand2.has_flush_draw() self.assertTrue(high1) self.assertFalse(low1) self.assertTrue(high2) self.assertFalse(low2)
def test_made_flush_doesnt_draw(self): hand = Hand(**self._made_flush) high, low = hand.has_flush_draw() self.assertFalse(high) self.assertFalse(low)
def test_flush_draw_both_cards(self): hand = Hand(**self._flush) high, low = hand.has_flush_draw() self.assertTrue(high) self.assertTrue(low)
def test_flush_draw_low_card(self): hand = Hand(**self._flush_low_card) high, low = hand.has_flush_draw() self.assertTrue(low) self.assertFalse(high)