Skip to content
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

Define a total order for Action #1199

Merged
merged 6 commits into from
Aug 29, 2018
Merged

Conversation

jsafyan
Copy link
Contributor

@jsafyan jsafyan commented Aug 21, 2018

This enables sorting Actions for Axelrod-Python/axelrod-dojo#50.

@marcharper
Copy link
Member

This is the failing test:

======================================================================
ERROR: test_sequence_player (axelrod.tests.strategies.test_sequence_player.TestSequencePlayer)
Basic test for SequencePlayer.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/Axelrod-Python/Axelrod/axelrod/tests/strategies/test_sequence_player.py", line 27, in test_sequence_player
    self.assertEqual(C, player.strategy(opponent))
  File "/home/travis/build/Axelrod-Python/Axelrod/axelrod/strategies/sequence_player.py", line 40, in strategy
    return self.meta_strategy(s)
  File "/home/travis/build/Axelrod-Python/Axelrod/axelrod/strategies/sequence_player.py", line 32, in meta_strategy
    if value == 0:
  File "/home/travis/build/Axelrod-Python/Axelrod/axelrod/action.py", line 35, in __eq__
    return self.value == other.value
AttributeError: 'int' object has no attribute 'value'

Otherwise LGTM

@drvinceknight
Copy link
Member

Looks good, thank you @jsafyan! 👍 👍

@drvinceknight drvinceknight merged commit eddbc71 into Axelrod-Python:master Aug 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants