-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate with --capture and -v options of pytest #14
Comments
This appears to be somewhat related to #1 but the solution provided by pytest-logging for changing log verbosity is by far more appealing because of the simplicity of the options IMHO. It would be nice if @s0undt3ch could provide a PR to integrate this feature in pytest-catchlog. The options |
I will provide a PR, just haven't gotten the time. |
My PR will obsolete my plugin and once you decide to rename catchlog to logging I will also remove my plugin from pypi... |
Perfectly fine. 😉 My day work also keeps me busy during the week so I just try to catch up with discussions on work days and try to devote some time to other projects like this one here during the weekend. Regarding the renaming we have a discussion running on the pytest mailing list. Maybe it does makes sense after all to rename this Plugin to pytest-logging. My opinion changed in favour to the rename. |
Once my PR is merged and catchlog releases a new version, can someone ping me so that I update the read me to redirect people to catchlog? |
References: * eisensheng#14 ("Integrate with --capture and -v options of pytest") * eisensheng#20 ("Move pytest-logging functionality to pytest-catchlog.")
When this functionality is integrated, please provide an option for catchlog to preserve the current behavior (i.e., do not print any log messages to stderr/stdout while the test is running, only report them afterwards and only if the test has failed). |
@Nikratio you mean you want that behaviour even with |
Yes. But more importantly, when using |
This issue can already be closed. The live-logging functionality has already been integrated into pytest-core. |
Indeed, thanks! |
There's a pytest-logging plugin by @s0undt3ch that provides a nice way to control logging through the default
-v
and-s
(alias for--capture=no
) options of pytest-core. The verbosity flag naturally configures the logging level, and the capturing option - whether to output live logs for all tests, or only capture them to show in case of a failure afterwards.For instance, one can run
py.test -vv -s
to see live logs at theINFO
level or above emitted by all tests.It would be nice to have something like that in pytest-catchlog.
The text was updated successfully, but these errors were encountered: