lsst.utils  13.0-8-gb7ca535+4
Classes | Namespaces | Functions | Variables
tests.py File Reference

Go to the source code of this file.

Classes

class  lsst.utils.tests.MemoryTestCase
 Check for memory leaks since memId0 was allocated. More...
 
class  lsst.utils.tests.ExecutablesTestCase
 Test that executables can be run and return good status. More...
 
class  lsst.utils.tests.TestCase
 Subclass of unittest.TestCase that adds some custom assertions for convenience. More...
 

Namespaces

 lsst.utils.tests
 

Functions

def lsst.utils.tests.init ()
 
def lsst.utils.tests.run (suite, exit=True)
 Exit with the status code resulting from running the provided test suite. More...
 
def lsst.utils.tests.sort_tests (tests)
 Go through the supplied sequence of test suites and sort them to ensure that MemoryTestCases are at the end of the test list. More...
 
def lsst.utils.tests.suiteClassWrapper (tests)
 
def lsst.utils.tests.findFileFromRoot (ifile)
 Find file which is specified as a path relative to the toplevel directory; we start in $cwd and walk up until we find the file (or throw IOError if it doesn't exist) More...
 
def lsst.utils.tests.getTempFilePath (ext)
 Return a path suitable for a temporary file and try to delete the file on success. More...
 
def lsst.utils.tests.inTestCase (func)
 A decorator to add a free function to our custom TestCase class, while also making it available as a free function. More...
 
def lsst.utils.tests.assertRaisesLsstCpp (testcase, excClass, callableObj, args, kwargs)
 
def lsst.utils.tests.debugger (exceptions)
 Decorator to enter the debugger when there's an uncaught exception. More...
 
def lsst.utils.tests.plotImageDiff (lhs, rhs, bad=None, diff=None, plotFileName=None)
 Plot the comparison of two 2-d NumPy arrays. More...
 
def lsst.utils.tests.assertFloatsAlmostEqual (testCase, lhs, rhs, rtol=sys.float_info.epsilon, atol=sys.float_info.epsilon, relTo=None, printFailures=True, plotOnFailure=False, plotFileName=None, invert=False, msg=None)
 Highly-configurable floating point comparisons for scalars and arrays. More...
 
def lsst.utils.tests.assertFloatsNotEqual (testCase, lhs, rhs, kwds)
 
def lsst.utils.tests.assertFloatsEqual (testCase, lhs, rhs, kwargs)
 
def lsst.utils.tests.assertClose (args, kwargs)
 
def lsst.utils.tests.assertNotClose (args, kwargs)
 

Variables

 lsst.utils.tests.psutil = None
 
 lsst.utils.tests.dafBase = None
 
int lsst.utils.tests.memId0 = 0
 
int lsst.utils.tests.nleakPrintMax = 20
 
 lsst.utils.tests.open_files = set()