Expand environment variables ($FOO) and user dirs (~/) passed in --json-report-file.
In particular, this is useful in cases where these are configured via config files (eg. pytest.ini) rather than being passed in directly in the command line. It also matches the behavior of --junitxml on pytest itself:
Expand environment variables (
$FOO
) and user dirs (~/
) passed in--json-report-file
.In particular, this is useful in cases where these are configured via config files (eg.
pytest.ini
) rather than being passed in directly in the command line. It also matches the behavior of--junitxml
on pytest itself:https://github.com/pytest-dev/pytest/blob/485c555812286003d9234b5818c9852c3256bccb/src/_pytest/junitxml.py#L475
And other similar plugins such as pytest-html:
https://github.com/pytest-dev/pytest-html/blob/8bc9a5d89b53a417c90645233597d0b506793d13/src/pytest_html/basereport.py#L22