Skip to content

Commit

Permalink
Fix integer->float division bug and raise on errors in testProcessCcd
Browse files Browse the repository at this point in the history
ProcessCcdTask.parseAndRun was failing without raising an exception, and so the
subsequent tests would fail because the files they expected were not created,
and thus it was really unclear where the problem was. Adding --doraise to the
arguments means the failure happens in setUp, so debugging is easier.
  • Loading branch information
parejkoj committed Nov 9, 2016
1 parent 996fbcb commit 770a1f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/lsst/obs/decam/decamCpIsr.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from __future__ import absolute_import, division, print_function
#
# LSST Data Management System
#
Expand Down Expand Up @@ -42,7 +43,7 @@ def _computeEdgeSize(rawExposure, calibExposure):
assert nx == ny, "Exposure is trimmed differently in X and Y"
assert nx%2 == 0, "Exposure is trimmed unevenly in X"
assert nx >= 0, "Calibration image is larger than raw data"
return nx/2
return nx//2


class DecamCpIsrTask(DecamIsrTask):
Expand Down
1 change: 1 addition & 0 deletions tests/testProcessCcd.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def setUp(self):
"isr.assembleCcd.setGain=False",
# This test uses CP-MasterCal calibration products
"-C", "%s/processCcdCpIsr.py" % configPath]
argsList.append('--doraise')
fullResult = ProcessCcdTask.parseAndRun(args=argsList, doReturnResults=True)
self.butler = fullResult.parsedCmd.butler
self.config = fullResult.parsedCmd.config
Expand Down

0 comments on commit 770a1f1

Please sign in to comment.