-
Notifications
You must be signed in to change notification settings - Fork 60
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
Warnings and errors from successful tests #886
Comments
I will work on this, assuming no one is already. |
Sure, go for it! Do you have access to our Github Actions logs? That might be a good way to find test suites where "expected' warnings are leaking into the logs. Here's an example: https://github.com/spedas/pyspedas/actions/runs/9628865091/job/26559881197 |
Oh, and is it ok if INFO logs are not outputted? Because right now I am essentially capturing all the logs for those tests, and that catches INFO logs as well. |
When those tests were written, we were happy as long as the routines could recover from bad or missing arguments without crashing! So for those cases where we're deliberately passing bad arguments, the best assertions to test are that the expected warnings are present in the log messages. There are plenty of other tests where we expect them to succeed, but warnings are generated -- for example, many of the MMS tests will give a lot of warnings about mismatched time/data array lengths and "mislabeled NRV variables". We'll handle those some other way -- for the purpose of this task, we should only be looking at tests that are deliberately passing invalid arguments. It's probably fine to capture all levels of log messages for the tests we're concerned with here. |
…ssful-tests-#886 Warnings and errors from successful tests #886
We have a number of tests that generate warnings and errors when they succeed (i.e. we're testing how they respond to invalid inputs):
We should be capturing the log outputs for these tests, then testing whether the expected errors or warnings are generated, rather than letting them go to the logs, where they look like problems. For example:
The text was updated successfully, but these errors were encountered: