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
DM-7207: Pytest updates #84
Conversation
I just want to register my agreement that random seeding should go in setUp: you don't want any dependence on other tests being run, so you want to reset the seed every time. |
if __name__ == "__main__": | ||
run(True) | ||
lsst.utils.tests.init() | ||
unittest.main() |
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.
Needs newline
There are a few bare |
@@ -308,11 +275,6 @@ def defineFilterProperty(self, name, lambdaEff, force=False): | |||
def testListFilters(self): | |||
self.assertEqual(afwImage.Filter_getNames(), self.filters) | |||
|
|||
def testCtor(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 has this test been deleted?
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.
There are no asserts and there are many other tests that make exactly that function call. It's not clear what the failure condition for this test would be, anyway.
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.
As I say above, asserts
are not required in test code. It may be that the test code used to throw an exception but then something was fixed. Of course, if everything that is in this test is found in other tests then it is no longer needed.
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.
It looks like this functionality is already in several other tests, including the an exact replica in testFilterEquality
, so I think it's ok to leave this deleted.
Yes @timj, I'm not sure what happened there. |
No description provided.