-
Notifications
You must be signed in to change notification settings - Fork 5
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
assert_ also matches assert_called_once_with() #3
Comments
Hi @The-Compiler sorry I didn't see this issue. We could just extend it to be |
sounds good to me - probably for the other matchers as well though? |
@The-Compiler sure, would you mind creating a pull request for it? |
I'm afraid I'm involved in too much stuff and thus too busy at the moment - sorry! (I'm also not using |
@The-Compiler sure no problem, I will try to get around doing it myself- Thanks for reporting! |
This way no false positives are given, like ``assert_called_once_with`` being mistakenly reported as ``assert_`` and thus asked to be replaced by ``assertTrue`` Bug reported by @The-Compiler: #3
Fixed on e4f0071 |
@The-Compiler I released 1.0, give it a try :) |
Works like a charm, thanks! |
When using a
unittest.mock
, there are certainassert_*
methods to be called, e.g.m.assert_called_once_with()
.Those get flagged wrongly:
I think this is a general problem, i.e. those matchers should only match if the full function name matches.
The text was updated successfully, but these errors were encountered: