-
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
TPI: UNITTEST output #22291
Comments
@eleanorjboyd Can you clarify 7. and 8. ? |
for 7, the formatting got messed up you have it correct that it should have the configure options. Log level are changed via these lines in the test_logging.py file. Sorry that wasn't clear in the steps!
|
For (7), I observe the same as Martin. For (10) / (11)'s reference to the asserts, I am a little confused since |
yes sorry for unittest you should be seeing
For |
On 11. as mentioned by Connor, On 12. Running from the terminal does not seem to update the Test Result, Python Test log or the decorators. Not sure what is the expected result... I have mostly guessed what we need to test here. Something with output. A brief summary of what has been implemented would have been nice. It's hard to know what from #21861 has been implemented at last. |
Thank you for testing @aeschli, I will provide more information with a summary next time! The 12 is correct, running from the terminal does not integrate with the rest of the extension and therefore you shouldn't see any updates to the Test Result, Python test logs etc. Instead I was just asking to see if what is printed as output from unittest (such as stack traces for errored tests) look the same as what a user can find in the Test Result panel (as they look to find the same information in our test results tab they would find when running unittest from the most basic scenario). Thanks! |
Refs: 21861
Complexity: 4
Author: @eleanorjboyd
Create Issue
Thank you for doing this testing!
General Setup
Clone the test repo from here or use your own repo of pytests.
Launch VSCode and open the
inc_dec_example_repo/inc_dec_example_test_suite
testing repo folder.Add the following to your settings in VSCode:
"python.experiments.optInto": ["pythonTestAdapter"],
Use the "create environment" command from the command palette, select
venv
and a Python version >=3.7.click the test explorer icon (beaker)
configure tests
1. unittest: unittest → root → pattern
*test*.py
Testing:
settings.json
you should see a"python.testing.unittestArgs": []
make the following changes and see the desired output. Output will be in theTest Results
panel unless stated otherwiseswitch to using log level error (in UNITTEST)
error
andcritical
logs show up (change back after)in the test result panel click on a failed test item
change test assert to
assert True
Add
["-v"]
, and keepassert True
From the terminal run
python -m unittest test_logging.py
test_logging.py
from the test explorerNon execution related tests
The text was updated successfully, but these errors were encountered: