Did I find the right examples for you? yes no

All Samples(26)  |  Call(26)  |  Derive(0)  |  Import(0)

src/w/e/websocket_cardgames-HEAD/kaibosh/test.py   websocket_cardgames(Download)
        assert g.state == 'play_card'
        assert g.next_player == p1
        p1.play_card(jack_of_hearts)
        self.render_template()
        try:
            p1.play_card(jack_of_hearts)
        p2.hand.append(queen_of_clubs)
        try:
            p2.play_card(queen_of_clubs)
            assert False, 'Must follow suit should raise'
        except MustFollowSuit:
            assert True
        p2.hand.remove(queen_of_clubs)
        p2.play_card(jack_of_diamonds)
        p3.play_card(queen_of_clubs)

src/w/e/websocket_cardgames-HEAD/crosspurposes/test.py   websocket_cardgames(Download)
    assert g.state == 'play_card'
    assert g.next_player == p1
    p1.play_card(p1_card)
    try:
        p1.play_card(p1_card)
        assert False, 'Out of turn not raised'
    except OutOfTurn:
        assert True
    p2.play_card(p2_card)
    p3.play_card(p3_card)
    p2.play_card(p2_card)
    p3.play_card(p3_card)
    p4.play_card(p4_card)
    assert g.tricks_won[p1] == 1
    assert g.next_player == p1