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'
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'
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'
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'
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'
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'
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'