def test_backdoor_flush_pair_in_hand(self): # Border case where there's a pair in hand. hand1 = Hand(**self._bd_flush_high_card_pair1) hand2 = Hand(**self._bd_flush_high_card_pair2) high1, low1 = hand1.has_backdoor_flush() high2, low2 = hand2.has_backdoor_flush() self.assertTrue(high1) self.assertFalse(low1) self.assertTrue(high2) self.assertFalse(low2)
def test_backdoor_flush_both_cards(self): hand = Hand(**self._bd_flush_both) high, low = hand.has_backdoor_flush() self.assertTrue(high) self.assertTrue(low)
def test_backdoor_flush_low_card(self): hand = Hand(**self._bd_flush_low) high, low = hand.has_backdoor_flush() self.assertTrue(low) self.assertFalse(high)