Skip to content

Commit 7577e83

Browse files
committed
Amend init test to check stochastic classifier
1 parent 8e8a5b7 commit 7577e83

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/test_player.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from axelrod_fortran.strategies import all_strategies
1+
from axelrod_fortran.strategies import classifiers, all_strategies
22
from axelrod_fortran import Player
33
from axelrod import Alternator, Cooperator, Defector, Match, Game
44
from axelrod.action import Action
@@ -12,7 +12,11 @@
1212
def test_init():
1313
for strategy in all_strategies:
1414
player = Player(strategy)
15-
assert player.classifier["stochastic"]
15+
is_stochastic = classifiers[strategy]['stochastic']
16+
if is_stochastic is not None and not is_stochastic:
17+
assert not player.classifier['stochastic']
18+
else:
19+
assert player.classifier['stochastic']
1620
assert player.original_name == strategy
1721
assert player.original_function.argtypes == (
1822
POINTER(c_int), POINTER(c_int), POINTER(c_int), POINTER(c_int),

0 commit comments

Comments
 (0)