|
We're doing some sanity testing for some log files missing in our tests and I just want a quick means of confirming what log file is configured for the current session. It would be nice to have this spelled out up front in the opening block |
Answered by
jxramos
Aug 6, 2025
Replies: 2 comments 1 reply
|
well I suppose I could avoid capturing stdout in pytest and just do something basic like print(f'--log-file={request.config.getoption("--log-file")}')is there a means for the user to add to the collection of initial config reporting that follows test session starts? |
1 reply
|
figured it out! Nice hooks def pytest_report_header(config):
log_file = config.getoption("--log-file")
if log_file:
return [f"log-file: {log_file}"] |
0 replies
Answer selected by
jxramos
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
figured it out! Nice hooks