-
Notifications
You must be signed in to change notification settings - Fork 271
Document passing a match length attribute to responses_test
#874
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
Comments
I think we should try to move to testing direct matches whenever possible rather than enforcing potentially impossible histories. In this case we could test that the last action is a defection by simply running a short match and checking the last action. Mock histories are ok in some cases, especially when finding just the right random seed would be very difficult, but as all the build warnings show now we're overusing this trick. |
That sounds good to me. Would involve going through all the tests and structuring the docs a bit differently (just reordering what's there). |
I was thinking of going through and sorting out those warnings at some point so I can change over to matches too. It'll probably be a slow burn but if no one else wants to do it I'm happy to assign this to myself... |
Although thinking about it, we should do this carefully and from a review point of view it's probably easier to do it small set of strategies at a time. Perhaps I can do a few and then we can open a nice descriptive issue. |
@marcharper I've just taken a quick look but the docs for
However the
(the arguments don't match up) We could however just remove the So for example here I have rewritten the test for Let me know what you think. |
I think this is on the right track. We should think about combining our responses test and the heads up test using our |
Very good point. I think I see a good way of doing this. I'm going to give something a go later today:
|
I've opened #875 with my suggestion :) 👍 |
Thanks. This is looking like a better approach -- easier to understand and it dogfoods our Match class, which is always a good thing. |
Closed by #875 |
This is currently not documented at http://axelrod.readthedocs.io/en/latest/tutorials/contributing/strategy/writing_test_for_the_new_strategy.html
but it is implemented: https://github.com/Axelrod-Python/Axelrod/blob/master/axelrod/tests/unit/test_backstabber.py#L36 👍
The text was updated successfully, but these errors were encountered: