-
Notifications
You must be signed in to change notification settings - Fork 66
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
changed formatting for unused kwargs error message #42
base: main
Are you sure you want to change the base?
Conversation
Thanks! We should probably also add a test for this, I'm not sure how straightforward it is to add tests for logged warnings. |
It looks like there is support in pytest to capture log messages, e.g., here. |
Ping @jacobgolomb |
d7dc520
to
61d489e
Compare
Instead I just captured the logger output with the unittest context manager and added an assertion that the expected warning message is in the logger's output. Is that an okay alternative? |
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.
The new test looks good to me, happy to merge once the CI passes.
The unit test is failing in the CI, but passes locally for me:
|
Maybe this could be due to self.parameters being updated before this specific test is run in CI and causing a different error to be raised first. |
That's weird, have you tried running that full test class with pytest? |
Actually, I feel like I remember reading that unittest log catching doesn't play well with pytest. That may be why I recommended pytest above. |
fixes issue #41