PY3.W0129
Assert on string literal
Used when an assert statement has a string literal as its first argument,which will cause the assert to always pass.
Noncompliant Code:
Copy
def test_division():
a = 9 / 3
assert "No ZeroDivisionError were raised"
Compliant Code:
Copy
def test_division():
a = 9 / 3
assert a == 3
Additional Details:
Directly asserting a string literal will always pass. The solution is to test something that could fail, or not assert at all.