Skip to content

Modify test to ensure that all strategies have names #1354

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 9, 2020
Merged

Modify test to ensure that all strategies have names #1354

merged 3 commits into from
Jul 9, 2020

Conversation

caddycarine
Copy link
Contributor

Test 'test_all_strategies_have_names' is always passed because when a strategy has no name, it adopts the name attribute from the 'Player' class.

@caddycarine caddycarine changed the title Modify test to ensure taht all strategies have names Modify test to ensure that all strategies have names Jul 5, 2020
@@ -43,7 +43,7 @@ strategy's logic as default, we use :code:`Classifiers[<classifier>](
<strategy>)`::

>>> from axelrod import Classifiers
>>> Classifiers['memory_depth'](axl.TitForTat)
>>> Classifiers['memory_depth'](axl.TitForTat())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did this need to be changed?

Copy link
Member

@marcharper marcharper Jul 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's not necessary per se but there is a warning:

/.../classifier.py:196: UserWarning: Classifiers are intended to run on player instances. Passed player Tit For Tat was initialized with default arguments.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense.

@drvinceknight drvinceknight merged commit 35e8c45 into Axelrod-Python:master Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants