-
Notifications
You must be signed in to change notification settings - Fork 262
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
Add match_attributes to match class #609
Conversation
Could have some tests showing checking behaviour when passing non defaults. |
The prob end tournament now tells the players the length of the match (which it shouldn't). I'm not sure where this got introduced (not in this PR I don't think), but this PR would allow us to pass a I think it would need the tournament to have a: |
is that not a separate bug which needs another issue created? |
I think it is indeed a separate thing, it's definitely not introduced by this right? (Still got my head deep in marking so if you could just confirm I'm not talking nonsense)... |
It's not something that this PR introduced. |
@@ -32,6 +32,19 @@ def test_init(self, turns, game): | |||
self.assertEqual(match.noise, 0) | |||
self.assertEqual(match.game.RPST(), game.RPST()) | |||
|
|||
@given(turns=integers(min_value=1, max_value=200), game=games()) | |||
@example(turns=5, game=axelrod.DefaultGame) | |||
def test_init(self, turns, game): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you change the name of this method to test_init_with_non_default_match_attributes
or perhaps something that's less of a mouthful (but something that isn't test_init
)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agghhhh!! Cut and paste strikes again!
Good to go from me. This clears the way for a nice fix of #610. 👍 |
That last commit fixes #610 |
Cool, I've opened #611, as a PR to this branch with a single test that just checks that players do indeed not know the length of the match. Done using the final transformer on the cooperators and checking their cooperation rating. |
closes #538