Skip to content

Commit

Permalink
Update unit test for py.test
Browse files Browse the repository at this point in the history
  • Loading branch information
r-owen committed Sep 14, 2016
1 parent ce50af1 commit b29ff0b
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions tests/testCoadd.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#
# LSST Data Management System
# Copyright 2008, 2009, 2010 LSST Corporation.
# Copyright 2008-2016 LSST Corporation.
#
# This product includes software developed by the
# LSST Project (http://www.lsst.org/).
Expand All @@ -29,7 +29,7 @@
from builtins import range
import numpy as np

import lsst.utils.tests as utilsTests
import lsst.utils.tests
import lsst.pex.policy as pexPolicy
import lsst.afw.image as afwImage
import lsst.afw.image.utils as imageUtils
Expand Down Expand Up @@ -187,22 +187,14 @@ def assertEqualFilterSets(self, fs1, fs2):
self.assertEquals(set(f.getName() for f in fs1), set(f.getName() for f in fs2))


def suite():
"""Return a suite containing all the test cases in this module.
"""
utilsTests.init()

suites = [
unittest.makeSuite(CoaddTestCase),
unittest.makeSuite(utilsTests.MemoryTestCase),
]
class MemoryTester(lsst.utils.tests.MemoryTestCase):
pass

return unittest.TestSuite(suites)

def setup_module(module):
lsst.utils.tests.init()

def run(shouldExit=False):
"""Run the tests"""
utilsTests.run(suite(), shouldExit)

if __name__ == "__main__":
run(True)
lsst.utils.tests.init()
unittest.main()

0 comments on commit b29ff0b

Please sign in to comment.