We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 54e8a90 commit e73767aCopy full SHA for e73767a
doc/data/messages/r/redundant-unittest-assert/bad.py
@@ -4,8 +4,3 @@
4
class DummyTestCase(unittest.TestCase):
5
def test_dummy(self):
6
self.assertTrue("foo") # [redundant-unittest-assert]
7
-
8
9
-def test_division():
10
- a = 9 / 3
11
- assert "No ZeroDivisionError were raised" # assert-on-string-literal
doc/data/messages/r/redundant-unittest-assert/good.py
@@ -3,9 +3,5 @@
3
- # Nothing, as an assert of a string literal will always pass
- pass
- assert a == 3
+ actual = "test_result"
+ self.assertEqual(actual, "expected")
0 commit comments