Poodle’s Runners#
.--~~,__ __ , /-.
:-....,-------`~~'._.' \ ______/ V`-, ((___/ __>
`-,,, ,_ ;'~U' } /~~ / }
_,-' ,'`-__; '--. /_)^ --,r' \ .--.( ___
(_/'~~ ''''(; |b |b \\ \\ /___\
Builtin Runner Names#
“command_line”: Command Line Runner
Command Line Runner#
The command line runner runs the test suite by running the provided command in subprocess.run
.
Environment Variables:#
The command line runner starts by copying the current environment variables, then making the following changes:
Add the temporary source folder to the beginning of “PYTHONPATH”
“PYTHONDONTWRITEBYTECODE”: “1” - This tells python to skip compiling source code in this run.
“MUT_SOURCE_FILE”: The name of the file that was mutated in this trial.
“MUT_LINENO”: The start line of the mutation change.
“MUT_END_LINENO”: The last line of the mutation change.
“MUT_COL_OFFSET”: The first column of the MUT_LINENO that is being mutated.
“MUT_END_COL_OFFSET”: The first column of the MUT_END_LINENO after the mutation change.
“MUT_TEXT”: The text that was used to replace the above range in the source file.
Update environment variables with values from runner_opts.command_line_env (if any)
Note
LINENO values start counting lines at 1.
COL_OFFSET values start counting columns at 0.
These values refer to the original source file, END values may not match mutated file.
Options:#
command_line#
Command to execute to test a trial.
Default: "pytest -x --assert=plain -o pythonpath="
Note
Default includes options -x
to stop execution at first failure, --assert=plain
to skip extra processing when assertions fail, and -o pythonpath=
so that pytest doesn’t alter the python path before running.
runner_opts = {
"command_line":"pytest -x --assert=plain -o pythonpath= --sort-mode=fastest",
}
[poodle.runner_opts]
command_line = "pytest -x --assert=plain -o pythonpath= --sort-mode=fastest"
[tool.poodle.runner_opts]
command_line = "pytest -x --assert=plain -o pythonpath= --sort-mode=fastest"
command_line_env#
Use this to set additional environment variables in the subprocesses.
Default: {}
runner_opts = {
"command_line_env":{"RUN_MODE":"MUTATION"},
}
[poodle.runner_opts.command_line_env]
RUN_MODE = "MUTATION"
[tool.poodle.runner_opts.command_line_env]
RUN_MODE = "MUTATION"