Beispiel #1
0
def test_straight_flush3():
    h1 = ['ace_clubs', 'king_clubs', 'queen_clubs', 'jack_clubs', '10_clubs']
    h1_v, h1_s = session6.card_split(h1)
    assert session6.straight_flush(h1_v, h1_s) == True, "straight_flush test result is not matching"
Beispiel #2
0
def test_card_split():
    h1 = ['ace_clubs', 'king_clubs', 'queen_clubs', 'jack_clubs', '10_clubs']
    h1_v, h1_s = session6.card_split(h1)
    assert len(h1_v) == len(h1_s), "card_split is not resulting in correct output"
Beispiel #3
0
def test_straight_flush1():
    h1 = ['2_diamonds', '3_diamonds', '4_diamonds', '5_diamonds']
    h1_v, h1_s = session6.card_split(h1)
    assert session6.straight_flush(h1_v, h1_s) == True, "straight_flush test result is not matching"
Beispiel #4
0
def test_straight_flush2():
    h1 = ['ace_clubs', '2_clubs', '3_clubs', '4_clubs', '5_clubs']
    h1_v, h1_s = session6.card_split(h1)
    assert session6.straight_flush(h1_v, h1_s) == True, "straight_flush test result is not matching"
Beispiel #5
0
def test_straight3():
    h1 = ['ace_clubs', 'king_diamonds', 'queen_clubs', 'jack_hearts', '10_hearts']
    h1_v, h1_s = session6.card_split(h1)
    assert session6.straight(h1_v, h1_s) == True, "straight test result is not matching"
Beispiel #6
0
def test_flush():
    h1 = ['ace_clubs', '5_clubs', '8_clubs', '2_clubs']
    h1_v, h1_s = session6.card_split(h1)
    assert session6.flush(h1_v, h1_s) == True, "flush test result is not matching"
Beispiel #7
0
def test_three_of_a_kind():
    h1 = ['6_diamonds', '6_clubs', '6_hearts', 'ace_hearts']
    h1_v, _ = session6.card_split(h1)
    assert session6.three_of_a_kind(h1_v) == True, "three_of_a_kind test result is not matching"
Beispiel #8
0
def test_straight2():
    h1 = ['ace_clubs', '2_diamonds', '3_clubs', '4_hearts', '5_hearts']
    h1_v, h1_s = session6.card_split(h1)
    assert session6.straight(h1_v, h1_s) == True, "straight test result is not matching"
Beispiel #9
0
def test_one_pair():
    h1 = ['6_diamonds', '6_clubs', '3_hearts']
    h1_v, _ = session6.card_split(h1)
    assert session6.one_pair(h1_v) == True, "One pair test result is not matching"
Beispiel #10
0
def test_royal_flush4():    
    with pytest.raises(ValueError) as e_info:
        h1, h2 = session6.get_hands_and_winner(4, solo=True)
        h1_v, h1_s = session6.card_split(h1)
        _ = session6.royal_flush(h1_v, h1_s)
Beispiel #11
0
def test_four_of_a_kind():    
    with pytest.raises(ValueError) as e_info:
        h1, h2 = session6.get_hands_and_winner(3, solo=True)
        h1_v, _ = session6.card_split(h1)
        _ = session6.four_of_a_kind(h1_v)
Beispiel #12
0
def test_full_house4():    
    with pytest.raises(ValueError) as e_info:
        h1, h2 = session6.get_hands_and_winner(4, solo=True)
        h1_v, h1_s = session6.card_split(h1)
        _ = session6.full_house(h1_v, h1_s)
Beispiel #13
0
def test_two_pair():    
    with pytest.raises(ValueError) as e_info:
        h1, h2 = session6.get_hands_and_winner(3, solo=True)
        h1_v, _ = session6.card_split(h1)
        _ = session6.two_pair(h1_v)