Skip to content

Commit bef0ce0

Browse files
committed
more succinctness in unit test (I'm new to unit tests ... thanks derdon)
1 parent cf7806c commit bef0ce0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bpython/test/test_repl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ def test_MatchesIterator(self):
6262
matches=matches)
6363

6464
# should be falsey before we enter (i.e. 'not active')
65-
self.assertEqual(bool(matches_iterator), False)
65+
self.assertFalse(matches_iterator)
6666

6767
slice = itertools.islice(matches_iterator, 0, 9)
6868
self.assertEqual(list(slice),matches * 3)
6969

7070
# should be truthy once we have an active match
71-
self.assertEqual(bool(matches_iterator), True)
71+
self.assertTrue(matches_iterator)
7272

7373
self.assertEqual(matches_iterator.current(), (matches * 3)[-1])
7474

0 commit comments

Comments
 (0)