-
Notifications
You must be signed in to change notification settings - Fork 99
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
Fix potentially buggy calls to "super" #706
Conversation
replace use of super by manually calling setUp with self on the class the test case inherits from
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.
LGTM just one question
@@ -83,7 +83,7 @@ class TestImageInspectorToolGray(BaseImageInspectorTool, TestCase): | |||
def setUp(self): | |||
values = np.arange(4).reshape(2, 2) | |||
self.plot = create_image_plot(values) | |||
super(TestImageInspectorToolGray, self).setUp() | |||
BaseImageInspectorTool.setUp(self) |
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 exactly can't this be super().setUp()
? I notice the tests all still pass if that change is made.
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.
we discussed this in person - this is part convention and part best practice afaik - especially because we have a few places where we need to call setUp
on more than one baseclass.
No description provided.