Skip to content

Commit 647106d

Browse files
authored
Merge pull request #1 from Axelrod-Python/hypothesis-setup
Add basic setup for hypothesis
2 parents 008a53f + 0f620e2 commit 647106d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/test_player.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
from axelrod_fortran.player import Player
33
from ctypes import c_int
44

5+
from hypothesis import given
6+
from hypothesis.strategies import integers
7+
58

69
def test_init():
710
for strategy in all_strategies:
@@ -10,7 +13,10 @@ def test_init():
1013
assert player.original_function.restype == c_int
1114

1215

13-
def test_strategy():
16+
@given(last_move=integers(min_value=0, max_value=1),
17+
score=integers(min_value=0, max_value=200))
18+
def test_strategy(last_move, score):
19+
print(last_move, score)
1420
for strategy in all_strategies:
1521
player = Player(strategy)
1622

0 commit comments

Comments
 (0)