Skip to content

Commit e73767a

Browse files
oups
1 parent 54e8a90 commit e73767a

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

doc/data/messages/r/redundant-unittest-assert/bad.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,3 @@
44
class DummyTestCase(unittest.TestCase):
55
def test_dummy(self):
66
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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,5 @@
33

44
class DummyTestCase(unittest.TestCase):
55
def test_dummy(self):
6-
# Nothing, as an assert of a string literal will always pass
7-
pass
8-
9-
def test_division():
10-
a = 9 / 3
11-
assert a == 3
6+
actual = "test_result"
7+
self.assertEqual(actual, "expected")

0 commit comments

Comments
 (0)