-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
good first issueeasy issue that is friendly to new contributoreasy issue that is friendly to new contributorplugin: loggingrelated to the logging builtin pluginrelated to the logging builtin plugintype: docsdocumentation improvement, missing or needing clarificationdocumentation improvement, missing or needing clarification
Description
In https://docs.pytest.org/en/5.4.3/reference.html, under "log_file", it says: "Sets a file name relative to the pytest.ini file"
Instead, the log file is created relative to the directory where pytest was invoked.
I ran pytest _test.py
in a subdirectory, with a pytest.ini
a few directories above it, with the following config:
[pytest]
python_files = _test*.py
testpaths = lib
log_cli = True
log_cli_level = DEBUG
log_file = pytest-logs.txt
log_file_level = DEBUG
A pytest-logs.txt
was created in the directory where I ran pytest.
I'm running:
pytest 5.4.3
macOs 10.15.4
Metadata
Metadata
Assignees
Labels
good first issueeasy issue that is friendly to new contributoreasy issue that is friendly to new contributorplugin: loggingrelated to the logging builtin pluginrelated to the logging builtin plugintype: docsdocumentation improvement, missing or needing clarificationdocumentation improvement, missing or needing clarification