-
Notifications
You must be signed in to change notification settings - Fork 278
Silence the logs when running the test suite #1039
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
Comments
One possible solution I tried is by using logger files, pipeline the stderr from the subprocess to them, and finally read from them (if they are not empty) and put the information to the The way I did that is by using the
and finally read from the temp file in the Cons: The messages we don't want to see on a successful tox run like:
comes from the Another question is how should we redirect them. |
Another possible solution is by using try could be by using
Cons:
and the result is that when I use this method the test suite freezes if I don't pass a timeout. |
I have confirmed that those messages Overall, the biggest question I see is that if the messages we want to filter are from the stderr too, then how do we distinguish them from the stderr we want to receive? |
I believe our goal here is to preserve output from However, we do not want to pollute the console output with error messages, particularly for expected scenarios. Other considerations:
|
What I am sure of is that it's important to see all related errors on a test failure.
I feel like those messages could be useful when you integrate TUF in an existing system like Warehouse. Those messages could be used to debug a problem. |
Agree with that sentiment.
Those messages are a symptom of our unit tests, I'm not sure how useful they would be in debugging an integration such as in the case of Warehouse. the "code 404, message File not found" comes from the simple_server.py's request handler. We may be able to filter those messages in the Note: the one line of |
@joshuagl I forgot to use the |
Uh oh!
There was an error while loading. Please reload this page.
Description of issue or feature request:
.
After my pull request, #1029 had been merged there are annoying messages when running the unit tests:
Current behavior:
Those messages are expected when running the unit tests from
tests/test_updater.py
for example and as such we don't want to see them in a successful test run.Expected behavior:
We want to be able to receive the
stderr
upon errors in the subprocesses, but on a successfultox
run I don't expect to see the above error messages.The text was updated successfully, but these errors were encountered: