helpconfig: add invocation dir to debug output

The current WD is not supposed to matter, the invocation dir is what
should be relevant. But keep them both for debugging.
This commit is contained in:
Ran Benita 2024-01-16 20:47:36 +02:00
parent 34fafe4c6b
commit 212c55218b
1 changed files with 2 additions and 1 deletions

View File

@ -109,10 +109,11 @@ def pytest_cmdline_parse() -> Generator[None, Config, Config]:
debugfile = open(path, "w", encoding="utf-8") debugfile = open(path, "w", encoding="utf-8")
debugfile.write( debugfile.write(
"versions pytest-%s, " "versions pytest-%s, "
"python-%s\ncwd=%s\nargs=%s\n\n" "python-%s\ninvocation_dir=%s\ncwd=%s\nargs=%s\n\n"
% ( % (
pytest.__version__, pytest.__version__,
".".join(map(str, sys.version_info)), ".".join(map(str, sys.version_info)),
config.invocation_params.dir,
os.getcwd(), os.getcwd(),
config.invocation_params.args, config.invocation_params.args,
) )