testcode 2.0 (alpha) documentation

Test verification

«  userconfig   ::   Contents   ::   testcode.py  »

Test verification

testcode compares selected data from an output with previously obtained output (the ‘benchmark’); a test passes if all data is within a desired tolerance. The data can be compared using an absolute tolerance and/or a relative tolerance. testcode needs some way of knowing what data from the output files should be validated. There are three options.

and a table containing multiple subtables:

  val_1   val_2   val3
   1.2     2      3.32
   8.7     4      17.2
  val_4   val_5
  11.22   221.0

Tables need not be beautifully presented: the amount of whitespace between
each table cell is not important, so long as there's at least one space
separating adjacent cells.

Column headings are used to label the data in the subsequent rows.  These
labels can be used to specify different tolerances for different types of
data.

Non-numerical values in a table are required to be equal (within python's
definition of equality for a given object).

«  userconfig   ::   Contents   ::   testcode.py  »