-
-
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: proposalproposal for a new feature, often to gather opinions or design the API around the new featureproposal for a new feature, often to gather opinions or design the API around the new feature
Description
If you provide a path with a subdirectory, which does not exist, it crashes with.
For example execute pytest --log-file=subtest/test.log
produces something like this:
INTERNALERROR> FileNotFoundError: [Errno 2] No such file or directory: '/tmp/test/subtest/test.log'
Maybe someone want to add something like this
dirname = os.path.dirname(os.path.abspath(logfile))
if not os.path.isdir(dirname):
os.makedirs(dirname)
However, there is the possibility to say that someone is not supposed to pass a directory path there.
Originally posted by @Hardy7cc in #7350 (comment)
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: proposalproposal for a new feature, often to gather opinions or design the API around the new featureproposal for a new feature, often to gather opinions or design the API around the new feature