LSSTApplications
16.0-10-g0ee56ad+4,16.0-11-ga33d1f2+4,16.0-12-g3ef5c14+2,16.0-12-g71e5ef5+17,16.0-12-gbdf3636+2,16.0-13-g118c103+2,16.0-13-g8f68b0a+2,16.0-15-gbf5c1cb+3,16.0-16-gfd17674+2,16.0-17-g7c01f5c+2,16.0-18-g0a50484,16.0-20-ga20f992+7,16.0-21-g0e05fd4+5,16.0-21-g15e2d33+3,16.0-22-g62d8060+3,16.0-22-g847a80f+3,16.0-25-gf00d9b8,16.0-28-g3990c221+3,16.0-3-gf928089+2,16.0-32-g88a4f23+4,16.0-34-gd7987ad+2,16.0-37-gc7333cb+1,16.0-4-g10fc685+1,16.0-4-g18f3627+25,16.0-4-g5f3a788+25,16.0-5-gaf5c3d7+3,16.0-5-gcc1f4bb,16.0-6-g3b92700+3,16.0-6-g4412fcd+2,16.0-6-g7235603+3,16.0-69-g2562ce1b+1,16.0-7-g0913a87,16.0-8-g14ebd58+3,16.0-8-g2df868b,16.0-8-g4cec79c+5,16.0-8-gadf6c7a,16.0-82-g59ec2a54a,16.0-9-g5400cdc+1,16.0-9-ge6233d7+4,master-g2880f2d8cf+2,v17.0.rc1
LSSTDataManagementBasePackage
|
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) |
def | runPythonTests (self, pyList) |
def | junitPrefix (self) |
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. |
Definition at line 56 of file tests.py.
def lsst.sconsUtils.tests.Control.args | ( | self, | |
test | |||
) |
Definition at line 106 of file tests.py.
def lsst.sconsUtils.tests.Control.junitPrefix | ( | self | ) |
Definition at line 315 of file tests.py.
def lsst.sconsUtils.tests.Control.messages | ( | self, | |
test | |||
) |
def lsst.sconsUtils.tests.Control.run | ( | self, | |
fileGlob | |||
) |
Create a test target for each file matching the supplied glob.
Definition at line 136 of file tests.py.
def lsst.sconsUtils.tests.Control.runPythonTests | ( | self, | |
pyList | |||
) |
Add a single target for testing all python files. pyList is a list of nodes corresponding to python test files. The IgnoreList is respected when scanning for entries. If pyList is None, or an empty list, it uses automated test discovery within pytest. This differs from the behavior of scripts.tests() where a distinction is made. Returns a list containing a single target.
Definition at line 208 of file tests.py.