Skip to content

Commit

Permalink
Add two more test points outside of ccd.
Browse files Browse the repository at this point in the history
  • Loading branch information
morriscb committed Jan 9, 2020
1 parent 5338939 commit 8fa5ed3
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions tests/test_diaForcedSource.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,22 @@ def create_test_dia_objects(n_points, wcs, startPos=100):
src.setCoord(wcs.pixelToSky(startPos + src_idx,
startPos + src_idx))

# Add one point outside of the CCD.
# Add points outside of the CCD.
# Fully outside.
src = objects.addNew()
src['id'] = 10000000
src.setCoord(wcs.pixelToSky(-100000,
-100000))
# y outside
src = objects.addNew()
src['id'] = 10000001
src.setCoord(wcs.pixelToSky(100,
-100000))
# x outside
src = objects.addNew()
src['id'] = 10000001
src.setCoord(wcs.pixelToSky(-100000,
100))

return objects

Expand Down Expand Up @@ -191,7 +202,7 @@ def testRun(self):

# Should be number of test objects minus one as one object is purposely
# outside of the ccd area.
self.assertEqual(len(dia_forced_sources), len(self.testDiaObjects) - 1)
self.assertEqual(len(dia_forced_sources), len(self.testDiaObjects) - 3)
self.assertEqual(len(dia_forced_sources.columns),
self.expected_n_columns)

Expand Down

0 comments on commit 8fa5ed3

Please sign in to comment.