Skip to content

Commit c89df5f

Browse files
authored
Add a long-run strategy to the filtering test (#1359)
* Add a long-run strategy to the filtering test Currently `test_boolean_filtering` only uses strategies as given by the `strategy_list` hypothesis strategy. This by default only picks short run time strategies so we are not ensuring that the long run filter works. * Changed float to int in rst file Last PR failed checks, probably due to an int vs float issue in the dependencies. * Modify config.yml Specified isort version dependency to facilitate checks during commit.
1 parent a1c52b4 commit c89df5f

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

.github/workflows/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ jobs:
5151
python run_mypy.py
5252
- name: Check imports are sorted
5353
run: |
54-
python -m pip install isort
55-
python -m isort --check-only
54+
python -m pip install "isort==4.3.21"
55+
python -m isort --check-only --recursive axelrod/.
5656
- name: Check that all strategies are indexed
5757
run: |
5858
python run_strategy_indexer.py

axelrod/tests/integration/test_filtering.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ def tearDown(self) -> None:
2121
warnings.simplefilter("default", category=UserWarning)
2222

2323
@given(strategies=strategy_lists(min_size=20, max_size=20))
24+
@example(strategies=[axl.DBS, axl.Cooperator])
2425
def test_boolean_filtering(self, strategies):
2526

2627
classifiers = [

docs/tutorials/advanced/tournament_results.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ This gives the count of cooperations made by each player during the first turn
343343
of every match::
344344

345345
>>> results.initial_cooperation_count
346-
[9.0, 0.0, 9.0, 9.0]
346+
[9, 0, 9, 9]
347347

348348
Each player plays an opponent a total of 9 times (3 opponents and 3
349349
repetitions). Apart from the :code:`Defector`, they all cooperate on the first

0 commit comments

Comments
 (0)