def test_is_straight_flush(self): tp = TexasPoker() tp._flops = [['spade', '9'], ['spade', 'J'], ['heart', 'A']] tp._turn = ['spade', 'Q'] tp._rever = ['club', 'K'] hole_cards = [['spade', 'K'], ['spade', '10']] assert_true(tp.is_straight_flush(hole_cards)) tp._flops = [['spade', 'A'], ['spade', '4'], ['heart', 'A']] tp._turn = ['spade', '5'] tp._rever = ['club', 'K'] hole_cards = [['spade', '2'], ['spade', '3']] assert_true(tp.is_straight_flush(hole_cards))
def test_is_one_pair(self): tp = TexasPoker() tp._flops = [['spade', '3'], ['heart', '9'], ['heart', 'A']] tp._turn = ['spade', '6'] tp._rever = ['heart', '8'] hole_cards = [['spade', '8'], ['spade', '10']] assert_true(tp.is_one_pair(hole_cards))
def test_is_flush(self): tp = TexasPoker() tp._flops = [['spade', '9'], ['heart', '9'], ['heart', 'A']] tp._turn = ['spade', 'Q'] tp._rever = ['spade', 'K'] hole_cards = [['spade', '8'], ['spade', 'K']] assert_true(tp.is_flush(hole_cards))
def test_is_four_of_a_kind(self): tp = TexasPoker() tp._flops = [['spade', '9'], ['spade', '9'], ['heart', 'A']] tp._turn = ['spade', 'Q'] tp._rever = ['club', 'K'] hole_cards = [['spade', '9'], ['spade', '9']] assert_true(tp.is_four_of_a_kind(hole_cards))
def test_is_flush_weight(self): tp = TexasPoker() tp._flops = [['spade', '9'], ['spade', '3'], ['heart', 'A']] tp._turn = ['spade', 'Q'] tp._rever = ['club', 'K'] hole_cards = [['spade', '8'], ['spade', 'K']] assert_equal(12, tp.is_flush_weight(hole_cards))
def test_is_fullhouse_weights(self): tp = TexasPoker() tp._flops = [['spade', '9'], ['heart', '9'], ['heart', 'A']] tp._turn = ['spade', 'Q'] tp._rever = ['club', 'K'] hole_cards = [['diamond', '9'], ['spade', 'K']] three_weight, pair_weight = tp.is_fullhouse_weights(hole_cards) assert_equal(8, three_weight) assert_equal(12, pair_weight)
def test_is_four_of_a_kind_weight(self): tp = TexasPoker() tp._flops = [['spade', '9'], ['heart', '9'], ['heart', 'A']] tp._turn = ['spade', 'Q'] tp._rever = ['club', 'K'] hole_cards = [['diamond', '9'], ['club', '9']] four_weight, single_weight = tp.is_four_of_a_kind_weight(hole_cards) assert_equal(8, four_weight) assert_equal(13, single_weight)