lsst.sconsUtils
13.0-7-gc601e82+1
|
A class to control unit tests. More...
Public Member Functions | |
def | __init__ (self, env, ignoreList=None, expectedFailures=None, args=None, tmpDir=".tests", verbose=False) |
Create an object to run tests. More... | |
def | args (self, test) |
def | ignore (self, test) |
def | messages (self, test) |
def | run (self, fileGlob) |
Public Attributes | |
runExamples | |
A class to control unit tests.
This class is unchanged from previous versions of sconsUtils, but it will now generally be called via scripts.BasicSConscript.tests().
def lsst.sconsUtils.tests.Control.__init__ | ( | self, | |
env, | |||
ignoreList = None , |
|||
expectedFailures = None , |
|||
args = None , |
|||
tmpDir = ".tests" , |
|||
verbose = False |
|||
) |
Create an object to run tests.
env | An SCons Environment (almost always lsst.sconsUtils.env). |
ignoreList | A list of tests that should NOT be run — useful in conjunction with glob patterns. If a file is listed as "@fileName", the @ is stripped and we don't bother to check if fileName exists (useful for machine-generated files). |
expectedFalures | A dictionary; the keys are tests that are known to fail; the values are strings to print. |
args | A dictionary with testnames as keys, and argument strings as values. As scons always runs from the top-level directory, tests has to fiddle with paths. If an argument is a file this is done automatically; if it's e.g. just a basename then you have to tell tests that it's really (part of a) filename by prefixing the name by "file:". |
tmpDir | The location of the test outputs. |
verbose | How chatty you want the test code to be. |
References lsst.sconsUtils.tests.Control._args, lsst.sconsUtils.tests.Control._cwd, lsst.sconsUtils.tests.Control._env, lsst.sconsUtils.tests.Control._EXPECT_FAILURE, lsst.sconsUtils.tests.Control._IGNORE, lsst.sconsUtils.tests.Control._info, lsst.sconsUtils.tests.Control._tmpDir, and lsst.sconsUtils.tests.Control._verbose.
def lsst.sconsUtils.tests.Control.args | ( | self, | |
test | |||
) |
References lsst.sconsUtils.tests.Control._args.
Referenced by lsst.sconsUtils.tests.Control.run().
def lsst.sconsUtils.tests.Control.ignore | ( | self, | |
test | |||
) |
References lsst.sconsUtils.tests.Control._env, lsst.sconsUtils.tests.Control._IGNORE, lsst.sconsUtils.tests.Control._info, and lsst.sconsUtils.tests.Control._verbose.
Referenced by lsst.sconsUtils.tests.Control.run().
def lsst.sconsUtils.tests.Control.messages | ( | self, | |
test | |||
) |
Return the messages to be used in case of success/failure; the logicals (note that they are strings) tell whether the test is expected to pass
References lsst.sconsUtils.tests.Control._EXPECT_FAILURE, and lsst.sconsUtils.tests.Control._info.
Referenced by lsst.sconsUtils.tests.Control.run().
def lsst.sconsUtils.tests.Control.run | ( | self, | |
fileGlob | |||
) |
References lsst.sconsUtils.tests.Control._cwd, lsst.sconsUtils.tests.Control._env, lsst.sconsUtils.tests.Control._tmpDir, lsst.sconsUtils.tests.Control.args(), lsst.sconsUtils.tests.Control.ignore(), lsst.sconsUtils.tests.Control.messages(), and lsst.sconsUtils.tests.Control.runExamples.
lsst.sconsUtils.tests.Control.runExamples |
Referenced by lsst.sconsUtils.tests.Control.run().