Notes on writing new test files:

A test file can contain anything, but usually it is similar to a regular input file (defining a test problem), with a mandatory Test class. This class holds all the test_* functions, as well as the from_conf(), which serves to initialize the test (conf is in fact the test file itself, options are command-line options).

All variables defined in a test file are collected in ‘conf’ variable passed to a Test.__init__(). For example, ‘input_name’ in test_input_*.py files is accessible as ‘conf.input_name’. This is usefull if the test class is defined outside the test file, as the classes in are.

The test_* functions are collected automatically by, with one exception: if a certain order of their evaluation is required, a class attribute ‘test’ of the Test class with a list of the test function names should be defined (example:

class run_tests.OutputFilter(allowed_lines)[source]
write(self, msg)[source]
run_tests.run_test(conf_name, options, ifile)[source]