Skip to content

Commit 122b4ef

Browse files
committed
[#36] Add tests for original_rank values
1 parent b19b4e9 commit 122b4ef

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/test_strategies.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
from axelrod_fortran import characteristics
2+
3+
4+
def test_original_rank():
5+
ranks = [
6+
details['original_rank']
7+
for details in characteristics.values()
8+
if details['original_rank'] is not None]
9+
10+
assert len(ranks) == 63
11+
12+
# Test that are no duplicates in the rank values
13+
assert len(ranks) == len(set(ranks))
14+
15+
# There were 63 strategies in the second tournament and so every integer
16+
# between 1 and 63 inclusive should appear in the ranks list. Those values
17+
# sum to 2016.
18+
assert sum(ranks) == 2016

0 commit comments

Comments
 (0)