Poodle’s Runners#
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.
Runner will replace the string {PYTHONPATH}
in the command with the python path that includes the temporary running location.
Default: "pytest -x --assert=plain -o pythonpath='{PYTHONPATH}'"
Note
Default includes options -x
to stop execution at first failure, --assert=plain
to skip extra processing when assertions fail, and -o pythonpath='{PYTHONPATH}'
so that pytest doesn’t add the current directory to the python path before running.
runner_opts = {
"command_line":"pytest -x --assert=plain -o pythonpath='{PYTHONPATH}' --sort-mode=fastest",
}
[poodle.runner_opts]
command_line = "pytest -x --assert=plain -o pythonpath='{PYTHONPATH}' --sort-mode=fastest"
[tool.poodle.runner_opts]
command_line = "pytest -x --assert=plain -o pythonpath='{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"