-
Notifications
You must be signed in to change notification settings - Fork 275
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
Option to show log output when running individual tests #1093
Comments
I'd prefer that the test log level was easily modifiable (like |
That would also be fine, so long as we can toggle easily. |
This is untrue AFAICT: the output is same on error or no error (in an error case there might be more high level output of course, but same logger levels get printed). We do not initialize logging at all when tests are run individually: It think the default is to only print WARNING and above. We could initialize the logging based on a env variable (or maybe an argv option) in each |
I'll open another issue on logging in general but leaving an example that should work right now here:
Notes:
|
all test_*.py files now accept zero or more '-v' to increase tuf logging level. The default is now ERROR. Default == ERROR "-v" == WARNING "-vv" == INFO "-vvv" == DEBUG Example to run a single test with DEBUG level: python3 test_updater.py -vvv TestUpdater.test_4_refresh Also make test_log.py restore the log level it modifies during test. Fixes theupdateframework#1093 Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
all test_*.py files now accept zero or more '-v' to increase tuf logging level. The default is now ERROR. default: ERROR "-v": ERROR, but unittest prints test names "-vv": WARNING "-vvv": INFO "-vvvv": DEBUG Example to run a single test with DEBUG level: python3 test_updater.py -vvvv TestUpdater.test_4_refresh Also make test_log.py restore the log level it modifies during test. Fixes theupdateframework#1093 Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
all test_*.py files now accept zero or more '-v' to increase tuf logging level. The default is now ERROR. default: ERROR "-v": ERROR, but unittest prints test names "-vv": WARNING "-vvv": INFO "-vvvv": DEBUG Example to run a single test with DEBUG level: python3 test_updater.py -vvvv TestUpdater.test_4_refresh Also make test_log.py restore the log level it modifies during test. Fixes theupdateframework#1093 Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
In #1083 @sechkova dug into the current logging behaviour and documented that
aggregate_tests.py
buffers the output on a successful run.IMNSHO we should only buffer individual tests run by hand when the -b command-line option is passed.
The text was updated successfully, but these errors were encountered: