-
Notifications
You must be signed in to change notification settings - Fork 269
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
Spruce up game and its tests #1206
Conversation
Here's the failing test. Otherwise LGTM:
|
@@ -1,33 +1,61 @@ | |||
from typing import Tuple, Union | |||
|
|||
from .action import Action | |||
from axelrod import Action |
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.
Why is this better? (I'm perfectly happy, just asking as a learning opportunity :))
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.
Well, relative imports are less common (also in the Axelrod library AFAIR) and generally discouraged. The rationale is mostly that relative imports can be ambiguous, whereas absolute ones are not. For more context: https://www.python.org/dev/peps/pep-0328
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.
Awesome: thanks for the explanation.
Is this related at all? |
It doesn't appear to be related, see #1207. @drvinceknight looks like maybe a dependency change broke a test? |
I'd bet on matplotlib. In /~https://github.com/matplotlib/matplotlib/releases/tag/v3.0.0 I read: Checking in #1208... |
... and seems that #1208 does fix it, so something changed with matplotlib 3.0.0 that broke TestPlot. |
Good call! Have rerun the tests and they all look fine. I've opened #1209 |
Continued work for #347