Skip to content

Commit 08a04bf

Browse files
committed
Simplify logic for testing stochastic classifier
1 parent 7577e83 commit 08a04bf

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tests/test_player.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,8 @@
1212
def test_init():
1313
for strategy in all_strategies:
1414
player = Player(strategy)
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']
15+
is_stochastic = classifiers[strategy]['stochastic'] in (True, None)
16+
assert player.classifier['stochastic'] == is_stochastic
2017
assert player.original_name == strategy
2118
assert player.original_function.argtypes == (
2219
POINTER(c_int), POINTER(c_int), POINTER(c_int), POINTER(c_int),

0 commit comments

Comments
 (0)