Replicate pytest output for VS Code test results #11344
Unanswered
eleanorjboyd
asked this question in
Q&A
Replies: 1 comment
-
Hi @eleanorjboyd, All the terminal output code lies in the terminal plugin, so much that the official way to disable all pytest output is by passing |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello again, I am working on the rewrite for pytest testing in vscode and was hoping for a bit more advice. I appreciate all the help this community has given me so far and hope that these changes in VS Code are useful to you too! As outlined in this issue microsoft/vscode-python#21861, I am redoing the look of the testing output for vscode. Before our options with the output were limited because we were parsing the output to populate our UI but the rewrite no longer does this due to a plugin we created. This being said we can now strive to have the best output possible, and for pytest this means most similar to the behavior users will expect from the command line. I was looking through your source code and was struggling to find how you craft the output to then print. I specifically want to produce the overall output per pytest run command that includes "platform, rootdir, config file etc" that is printed at the top of all pytest output. I would also like to be able to present per-test output to the user. This means for each test function run the out / errors / logs. I can see from the TestReport item the existence of caplog:'', capstderr:'', and capstdout:'', which is likely what I will use but want to format it as similar as possible to how pytest would. Thanks!
Here is the output for the whole pytest run I was talking about
and a single test output
Beta Was this translation helpful? Give feedback.
All reactions