Skip to content

Commit

Permalink
Add a long-run strategy to the filtering test (#1359)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
caddycarine authored Aug 7, 2020
1 parent a1c52b4 commit c89df5f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ jobs:
python run_mypy.py
- name: Check imports are sorted
run: |
python -m pip install isort
python -m isort --check-only
python -m pip install "isort==4.3.21"
python -m isort --check-only --recursive axelrod/.
- name: Check that all strategies are indexed
run: |
python run_strategy_indexer.py
Expand Down
1 change: 1 addition & 0 deletions axelrod/tests/integration/test_filtering.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def tearDown(self) -> None:
warnings.simplefilter("default", category=UserWarning)

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

classifiers = [
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/advanced/tournament_results.rst
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ This gives the count of cooperations made by each player during the first turn
of every match::

>>> results.initial_cooperation_count
[9.0, 0.0, 9.0, 9.0]
[9, 0, 9, 9]

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

0 comments on commit c89df5f

Please sign in to comment.