dune_python_add_testΒΆ

dune_python_add_test(
     COMMAND command1 [command2 ...]
    [WORKING_DIRECTORY dir]
    [NAME name]
)
COMMAND

The command to run. It will be executed during make test_python and during ctest.

Note

If your testing command involves an invocation of the python interpreter you should use ${PYTHON_EXECUTABLE} for that. Also calling python executables through -m is generally to be favored, e.g. ${PYTHON_EXECUTABLE} -m pytest instead of py.test.

WORKING_DIRECTORY

The working directory of the command. Defaults to the current build directory.

NAME

A name to identify this test in ctest. Names must be unique throughout the project. If omitted, defaults to mangling of the command.

Integrates a python testing framework command into the Dune build system. Added commands are run, when the target test_python is built and during ctest.