-
Notifications
You must be signed in to change notification settings - Fork 119
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
test: add type hinting to test_lib #1012
test: add type hinting to test_lib #1012
Conversation
* Stop testing debug level logs. * Ignore the type checking when we are deliberately checking for bad type handling. * Pass a dummy spec rather than None, to avoid type complaints. * Work around an optional argument.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good work, and thanks for the removal of logassert
as discussed. No need for this to be a draft PR I think.
Looks like there's one failing test on Python 3.8, presumably due to |
@benhoyt this failed in CI because unittest.TestCase.assertNoLogs is new in 3.10. Would you just get rid of the check that there's no warning logged, or do a temporary but ugly Edit: oops, Github hadn't refreshed the page, so I didn't notice you already said that. But still, the same question: do you have a preference for how it's avoided? I would tend towards just not doing this check. |
I changed it to draft when I saw it failed in CI, to hopefully (but not successfully) avoid you bothering with it before I fixed the issue. |
Ah, don't worry about that.
I think if it's worth doing the test it's worth doing it on Python 3.8 too (a version we need to support). So let's change it to use |
Extends the type hinting for tests:
Partially addresses #1007.