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-30148: PipelineTasks use wrong label as name #123
Conversation
5552e43
to
6d7b229
Compare
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.
A PR that is almost all tests to find and fix a small bit of code and add coverage to un-covered code. Wholehearted approval!
A few docs-related suggestions, but otherwise good.
return mock | ||
|
||
|
||
class TaskFactoryTestCase(unittest.TestCase): |
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.
Please add a docstring: it's not obvious to me what a "TaskFactory" test would be testing. I think it's testing TaskFactory.makeTask()
with a variety of combinations of optional arguments?
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 tests the functionality of TaskFactory
(which happens to consist of one method)? I'm not sure what I could say that wouldn't be obvious.
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.
Hmmm, maybe the fact that TaskFactory
itself is short on documentation is really my problem? I was looking at the test without knowing anything about TaskFactory: I didn't know it only had one method.
tests/test_taskFactory.py
Outdated
overrides=None, butler=None) | ||
self.tracker.assert_called_with(config=FakeConfig(), initInputs=None, name=None) | ||
|
||
def testAllOptions(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.
This is a test of makeTask
called with all kwargs? Maybe rename it or add a docstring.
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.
testOnlyMandatoryArg
and testAllArgs
?
Note that "kwargs" is kind of a pointless term here, since none of the parameters have defaults.
Policy is to only update for the current year, but I've added missing entries for 2019-2020 as well.
f2d04a5
to
a797b10
Compare
This PR fixes a name collision inadvertently introduced in #122, and adds unit tests to catch similar bugs in the future.