Pattern: Use of assert
on string literal
Issue: -
Used when an assert
statement has a string literal as its first argument, which will cause the assert to always pass.
Example of incorrect code:
assert "There is an AssertionError" # [assert-on-string-literal]
Example of correct code:
assert [foo, bar], "No AssertionError"