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

Method test_next

bpython/test/test_repl.py:80–88  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

78 self.matches_iterator.matches = self.matches
79
80 def test_next(self):
81 self.assertEqual(next(self.matches_iterator), self.matches[0])
82
83 for x in range(len(self.matches) - 1):
84 next(self.matches_iterator)
85
86 self.assertEqual(next(self.matches_iterator), self.matches[0])
87 self.assertEqual(next(self.matches_iterator), self.matches[1])
88 self.assertNotEqual(next(self.matches_iterator), self.matches[1])
89
90 def test_previous(self):
91 self.assertEqual(self.matches_iterator.previous(), self.matches[2])

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected