assert-on-tuple / W0199#
Assert called on a 2-item-tuple. Did you mean 'assert x,y'?
A call of assert on a tuple will always evaluate to true if the tuple is not empty, and will always evaluate to false if it is.
x, y = (1, None) assert x assert y
assert (1, None) # [assert-on-tuple]
- Directly asserting a non-empty tuple will always pass. The solution is to
test something that could fail, or not assert at all.
unittestassertions there is the similar redundant-unittest-assert / W1503 message.
Created by the basic checker.