Skip to content

Commit

Permalink
Remove incorrect comment about a test mock.
Browse files Browse the repository at this point in the history
I had thought calls using _getConfig were slow because they triggered
an expensive copy in the ApPipeTask constructor. Instead, _getConfig
is slow because Config construction is slow.
  • Loading branch information
kfindeisen committed Jul 30, 2018
1 parent f198876 commit 53f1398
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def setUpMockPatch(self, target, **kwargs):
self.addCleanup(patcher.stop)
return mock

# Mock up ApPipeTask to avoid doing any processing. _getConfig patch may be unneccessary after DM-13602
# Mock up ApPipeTask to avoid doing any processing.
@unittest.mock.patch("lsst.ap.verify.pipeline_driver._getConfig", return_value=None)
@patchApPipe
def testRunApPipeReturn(self, _mockConfig, mockClass):
Expand All @@ -131,7 +131,7 @@ def testRunApPipeReturn(self, _mockConfig, mockClass):
self.assertEqual(len(metadata.paramNames(topLevelOnly=False)), 1)
self.assertEqual(metadata.getScalar("lsst.ap.pipe.ccdProcessor.cycleCount"), 42)

# Mock up ApPipeTask to avoid doing any processing. _getConfig patch may be unneccessary after DM-13602
# Mock up ApPipeTask to avoid doing any processing.
@unittest.mock.patch("lsst.ap.verify.pipeline_driver._getConfig", return_value=None)
@patchApPipe
def testRunApPipeSteps(self, _mockConfig, mockClass):
Expand Down Expand Up @@ -168,7 +168,7 @@ def testUpdateMetricsReal(self):

self.assertEqual(self.job.measurements, self.subtaskJob.measurements)

# Mock up ApPipeTask to avoid doing any processing. _getConfig patch may be unneccessary after DM-13602
# Mock up ApPipeTask to avoid doing any processing.
@unittest.mock.patch("lsst.ap.verify.pipeline_driver._getConfig", return_value=None)
@patchApPipe
def testUpdateMetricsOnError(self, _mockConfig, mockClass):
Expand Down

0 comments on commit 53f1398

Please sign in to comment.