Exemplo n.º 1
0
def test_flush_16():
    hand_1 = ['c-10', 'c-9', 'c-8', 'c-k', 'c-A']
    hand_2 = ['d-10', 'd-9', 'd-8', 'd-K', 'd-a']
    output = session6.winner(hand_1, hand_2)
    assert output == 'Flush ** Player 2 won !', 'Incorrect Result'
Exemplo n.º 2
0
def test_straight_flush_3():
    hand_1 = ['c-2', 'c-3', 'c-4', 'c-5', 'c-6']
    hand_2 = ['c-q', 'd-q', 's-q', 'H-q', 'D-2']
    output = session6.winner(hand_1, hand_2)
    assert output == 'Straight Flush ** Player 1 won !', 'Incorrect Result'
Exemplo n.º 3
0
def test_straight_flush_6():
    hand_1 = ['c-10', 'c-9', 'c-8', 'c-k']
    hand_2 = ['s-9', 's-10', 's-j', 's-q']
    output = session6.winner(hand_1, hand_2)
    assert output == 'Straight Flush ** Player 2 won !', 'Incorrect Result'
Exemplo n.º 4
0
def test_less_than_3_cards_42():
    hand_1 = ['s-2', 'c-2']
    hand_2 = ['s-a', 'd-a']
    output = session6.winner(hand_1, hand_2)
    assert output == 'Each hand needs 3, 4 or 5 cards - Less than 3 cards found', 'Incorrect Result'
Exemplo n.º 5
0
def test_royal_flush_1():
    hand_1 = ['c-10', 'c-j', 'c-q', 'c-k', 'c-a']
    hand_2 = ['h-8', 'H-9', 'h-10', 'h-j', 'h-q']
    output = session6.winner(hand_1, hand_2)
    assert output == 'Royal Flush ** Player 1 won !', 'Incorrect Result'
Exemplo n.º 6
0
def test_one_pair_37():
    hand_1 = ['c-q', 'd-q', 'h-4', 'h-7']
    hand_2 = ['c-a', 'd-k', 'h-6', 's-Q']
    output = session6.winner(hand_1, hand_2)
    assert output == '1-pair ** Player 1 won !', 'Incorrect Result'
Exemplo n.º 7
0
def test_equal_hand_40():
    hand_1 = ['s-2', 'c-2', 'd-3', 'c-4']
    hand_2 = ['s-a', 'd-a', 'h-2']
    output = session6.winner(hand_1, hand_2)
    assert output == 'Both hands need equal cards', 'Incorrect Result'
Exemplo n.º 8
0
def test_straight_23():
    hand_1 = ['s-10', 'c-9', 's-8', 's-j']
    hand_2 = ['s-k', 'c-k', 'd-2', 'c-3']
    output = session6.winner(hand_1, hand_2)
    assert output == 'Straight ** Player 1 won !', 'Incorrect Result'
Exemplo n.º 9
0
def test_straight_24():
    hand_1 = ['c-2', 'd-3', 'h-4', 's-5']
    hand_2 = ['s-7', 'c-8', 'd-10', 'h-9']
    output = session6.winner(hand_1, hand_2)
    assert output == 'Straight ** Player 2 won !', 'Incorrect Result'
Exemplo n.º 10
0
def test_straight_21():
    hand_1 = ['c-2', 'c-3', 'c-4', 'd-6', 'C-5']
    hand_2 = ['c-10', 'd-10', 's-9', 's-10', 'c-7']
    output = session6.winner(hand_1, hand_2)
    assert output == 'Straight ** Player 1 won !', 'Incorrect Result'
Exemplo n.º 11
0
def test_straight_22():
    hand_1 = ['c-9', 's-9', 'd-2', 'h-2', 's-A']
    hand_2 = ['c-3', 'd-4', 'H-5', 's-7', 'S-6']
    output = session6.winner(hand_1, hand_2)
    assert output == 'Straight ** Player 2 won !', 'Incorrect Result'
Exemplo n.º 12
0
def test_flush_20():
    hand_1 = ['D-2', 'S-2', 'c-K']
    hand_2 = ['s-10', 's-a', 's-4']
    output = session6.winner(hand_1, hand_2)
    assert output == 'Flush ** Player 2 won !', 'Incorrect Result'
Exemplo n.º 13
0
def test_flush_19():
    hand_1 = ['c-2', 'c-a', 'c-K']
    hand_2 = ['s-K', 'h-k', 'd-k']
    output = session6.winner(hand_1, hand_2)
    assert output == 'Flush ** Player 1 won !', 'Incorrect Result'
Exemplo n.º 14
0
def test_flush_18():
    hand_1 = ['h-10', 'h-9', 'H-8', 'h-a']
    hand_2 = ['s-10', 's-9', 's-8', 's-a']
    output = session6.winner(hand_1, hand_2)
    assert output == 'Flush ** Player 2 won !', 'Incorrect Result'
Exemplo n.º 15
0
def test_two_pair_34():
    hand_1 = ['d-a', 'h-a', 's-2', 'c-2']
    hand_2 = ['s-a', 'c-a', 'h-9', 'd-9']
    output = session6.winner(hand_1, hand_2)
    assert output == '2-pairs ** Player 2 won !', 'Incorrect Result'
Exemplo n.º 16
0
def test_straight_25():
    hand_1 = ['s-2', 'd-4', 'c-3']
    hand_2 = ['s-a', 'c-a', 'd-a']
    output = session6.winner(hand_1, hand_2)
    assert output == 'Straight ** Player 1 won !', 'Incorrect Result'
Exemplo n.º 17
0
def test_one_pair_35():
    hand_1 = ['s-9', 'h-9', 'd-3', 'c-4', 's-Q']
    hand_2 = ['s-a', 'd-10', 'c-7', 'h-k', 'c-2']
    output = session6.winner(hand_1, hand_2)
    assert output == '1-pair ** Player 1 won !', 'Incorrect Result'
Exemplo n.º 18
0
def test_straight_26():
    hand_1 = ['s-10', 'c-q', 'd-j']
    hand_2 = ['h-A', 's-a', 's-2']
    output = session6.winner(hand_1, hand_2)
    assert output == 'Straight ** Player 1 won !', 'Incorrect Result'
Exemplo n.º 19
0
def test_one_pair_39():
    hand_1 = ['s-2', 'c-2', 'd-3']
    hand_2 = ['s-a', 'd-a', 'h-2']
    output = session6.winner(hand_1, hand_2)
    assert output == '1-pair ** Player 2 won !', 'Incorrect Result'
Exemplo n.º 20
0
def test_three_of_a_kind_28():
    hand_1 = ['s-9', 'h-9', 'd-3', 'c-4', 's-a']
    hand_2 = ['s-10', 'c-2', 'd-2', 'h-2', 'h-q']
    output = session6.winner(hand_1, hand_2)
    assert output == '3-of-a-kind ** Player 2 won !', 'Incorrect Result'
Exemplo n.º 21
0
def test_more_than_5_cards_41():
    hand_1 = ['s-2', 'c-2', 'd-3', 'c-4', 'c-a', 'c-q']
    hand_2 = ['s-a', 'd-a', 'h-2', 'h-3', 'h-5', 'h-6']
    output = session6.winner(hand_1, hand_2)
    assert output == 'Each hand needs 3, 4 or 5 cards - More than 5 cards found', 'Incorrect Result'
Exemplo n.º 22
0
def test_three_of_a_kind_30():
    hand_1 = ['s-9', 'c-9', 'd-9']
    hand_2 = ['s-a', 'c-a', 'd-10']
    output = session6.winner(hand_1, hand_2)
    assert output == '3-of-a-kind ** Player 1 won !', 'Incorrect Result'
Exemplo n.º 23
0
def test_duplicate_cards_in_hands_43():
    hand_1 = ['s-9', 'h-9', 'd-3', 'c-4', 's-a']
    hand_2 = ['c-a', 'd-a', 'c-3', 'd-4', 's-9']
    output = session6.winner(hand_1, hand_2)
    assert output == 'Duplicate cards found in both hands - Only 1 deck is permitted', 'Incorrect Result'
Exemplo n.º 24
0
def test_two_pair_31():
    hand_1 = ['s-j', 'd-j', 's-9', 'c-9', 'h-3']
    hand_2 = ['s-k', 'd-k', 'c-2', 'd-4', 'h-q']
    output = session6.winner(hand_1, hand_2)
    assert output == '2-pairs ** Player 1 won !', 'Incorrect Result'
Exemplo n.º 25
0
def test_royal_flush_2():
    hand_1 = ['h-8', 'H-9', 'c-10', 'H-K', 'h-Q']
    hand_2 = ['s-10', 'S-j', 'S-q', 's-A', 'S-k']
    output = session6.winner(hand_1, hand_2)
    assert output == 'Royal Flush ** Player 2 won !', 'Incorrect Result'
Exemplo n.º 26
0
def test_two_pair_32():
    hand_1 = ['s-10', 'c-10', 's-8', 'h-8', 'd-2']
    hand_2 = ['s-j', 'd-j', 's-9', 'c-9', 'h-3']
    output = session6.winner(hand_1, hand_2)
    assert output == '2-pairs ** Player 2 won !', 'Incorrect Result'
Exemplo n.º 27
0
def test_straight_flush_4():
    hand_1 = ['c-2', 'c-3', 'c-4', 'c-5', 'c-6']
    hand_2 = ['H-9', 'h-10', 'h-j', 'h-Q', 'H-K']
    output = session6.winner(hand_1, hand_2)
    assert output == 'Straight Flush ** Player 2 won !', 'Incorrect Result'
Exemplo n.º 28
0
def test_two_pair_33():
    hand_1 = ['s-a', 'c-a', 'h-9', 'd-9']
    hand_2 = ['c-q', 'd-q', 'h-4', 'h-7']
    output = session6.winner(hand_1, hand_2)
    assert output == '2-pairs ** Player 1 won !', 'Incorrect Result'
Exemplo n.º 29
0
def test_straight_flush_7():
    hand_1 = ['d-9', 'd-10', 'D-j']
    hand_2 = ['S-2', 'c-3', 'c-4']
    output = session6.winner(hand_1, hand_2)
    assert output == 'Straight Flush ** Player 1 won !', 'Incorrect Result'
Exemplo n.º 30
0
def test_flush_15():
    hand_1 = ['c-2', 'c-3', 'c-9', 'c-K', 'c-a']
    hand_2 = ['s-9', 'c-10', 'd-j', 'h-q', 's-K']
    output = session6.winner(hand_1, hand_2)
    assert output == 'Flush ** Player 1 won !', 'Incorrect Result'