-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
assertion rewriting should report errors when passing tuples to assertions #1562
Comments
@RonnyPfannschmidt I would love to work on this. Could you please explain more about this issue? |
@Akasurde the idea is, that when the ast rewriter sees a Assert node whose assertion is a tuple, it should issue a pytest-warning the problem is that python has an equivalence of so we can take it for sure, that the test-writer meant to write |
Would it be possible to only issue the warning if it's a tuple literal? I think if |
@The-Compiler thats how i meant it, i just used the example to show what python does |
Add warning for assertions on tuples #1562
Fixed in #1675 |
in a downstream project we suffered some false passes due to a new programmer using code like
assert(condition, message)
which is always true and certainly wasn't the intentionThe text was updated successfully, but these errors were encountered: