MCPcopy Create free account
hub / github.com/bpython/bpython / test_nonzero

Method test_nonzero

bpython/test/test_repl.py:100–106  ·  view source on GitHub ↗

self.matches_iterator should be False at start, then True once we active a match.

(self)

Source from the content-addressed store, hash-verified

98 self.assertEqual(self.matches_iterator.previous(), self.matches[0])
99
100 def test_nonzero(self):
101 """self.matches_iterator should be False at start,
102 then True once we active a match.
103 """
104 self.assertFalse(self.matches_iterator)
105 next(self.matches_iterator)
106 self.assertTrue(self.matches_iterator)
107
108 def test_iter(self):
109 slice = islice(self.matches_iterator, 0, 9)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected