-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
pytest results in VSCode should show logging. #21781
Comments
Thank you for your issue report. We are looking into this now! In the meantime, you are likely on the new testing rewrite and this is why you saw a change in behavior. You can opt out of the rewrite as I get this fix in by setting this in your user settings: |
I was incorrect this can be done- reopening to investigate. Sorry about that |
Hello I have spent a while digging into this issue specifically because of #21861. In my investigation, the output (which is where logging is sent) is separate from the stack trace and message that pytest saves for failed tests which is what is shown per test. Since this is just output, and there is no way good way to capture the output perfectly per test run while still supplying the logging I don't think it is realistic for us to do this at this time. If this idea gets more traction I can rethink but design-wise pytest doesn't split output by test so with the goal of replicating pytest in our extension this is not something we necessarily want to provide. |
I have a simple test:
I configuted pytest so it is logging at info level.
See pyproject.toml:
When I execute the test with
pytest tests
it shows this:Please not that it also shows the log output - which is this:
INFO tests.test_log:test_log.py:8 >>>>>> Test1 <<<<<<<<<<<<< 888
.I also want to see this logging output on the VSCode snippet that shows up at failed test functions. See screenshot:
But it is missing here:
Can you add the log output?
The text was updated successfully, but these errors were encountered: