Beispiel #1
0
    def test_10(self, capsys):
        p1 = pockerhand.Player('Mason', 'S1, S3, S5, S7, S8')
        p2 = pockerhand.Player('Rina', 'H3, H3, D3, D5, C5')
        game = pockerhand.Game(p1, p2)
        game.play()

        captured = capsys.readouterr()
        assert captured.out.strip() == 'Rina win: Full house'
Beispiel #2
0
    def test_11(self, capsys):
        p1 = pockerhand.Player('Mason', 'S2, D3, D4, C5, C6')
        p2 = pockerhand.Player('Rina', 'H3, H3, D3, D5, C9')
        game = pockerhand.Game(p1, p2)
        game.play()

        captured = capsys.readouterr()
        assert captured.out.strip() == 'Mason win: Straight'
Beispiel #3
0
    def test_8(self, capsys):
        p1 = pockerhand.Player('Mason', 'H1, D1, S1, C1, C9')
        p2 = pockerhand.Player('Rina', 'H1, H3, D5, D7, C9')
        game = pockerhand.Game(p1, p2)
        game.play()

        captured = capsys.readouterr()
        assert captured.out.strip() == 'Mason win: Four of a Kind'
Beispiel #4
0
    def test_7(self, capsys):
        p1 = pockerhand.Player('Mason', 'H1, H3, D5, D7, C9')
        p2 = pockerhand.Player('Rina', 'H3, H3, D3, D5, C9')
        game = pockerhand.Game(p1, p2)
        game.play()

        captured = capsys.readouterr()
        assert captured.out.strip() == 'Rina win: Three of a kind'
Beispiel #5
0
    def test_1(self, capsys):
        p1 = pockerhand.Player('Mason', 'S1, S3, S5, S7, S8')
        p2 = pockerhand.Player('Rina', 'H1, H3, D5, D7, C9')
        game = pockerhand.Game(p1, p2)
        game.play()

        captured = capsys.readouterr()
        assert captured.out.strip() == 'Mason win: Flush'
Beispiel #6
0
    def test_4(self, capsys):
        p1 = pockerhand.Player('Mason', 'H1, H3, D5, D7, C9')
        p2 = pockerhand.Player('Rina', 'H1, H3, D5, D7, C9')
        game = pockerhand.Game(p1, p2)
        game.play()

        captured = capsys.readouterr()
        assert captured.out.strip() == 'draw High card High card'
Beispiel #7
0
    def test_3(self, capsys):
        p1 = pockerhand.Player('Mason', 'S1, S3, S5, S7, S8')
        p2 = pockerhand.Player('Rina', 'S1, S3, S5, S7, S8')
        game = pockerhand.Game(p1, p2)
        game.play()

        captured = capsys.readouterr()
        assert captured.out.strip() == 'draw Flush Flush'