run_tests.py script

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 tests_basic.py are.

The test_* functions are collected automatically by run_tests.py, 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: test_meshio.py).

class run_tests.OutputFilter(allowed_lines)[source]
flush(self)[source]
start(self)[source]
stop(self)[source]
write(self, msg)[source]
run_tests.get_dir(default)[source]
run_tests.main()[source]
run_tests.run_test(conf_name, options, ifile)[source]
run_tests.wrap_run_tests(options)[source]