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

Method test_forward

bpython/test/test_history.py:48–57  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

46 self.assertEqual(self.history.back(), "#0")
47
48 def test_forward(self):
49 self.history.first()
50
51 self.assertEqual(self.history.forward(), "#1")
52 self.assertNotEqual(self.history.forward(), "#1")
53 self.assertEqual(self.history.forward(), "#3")
54 # 1000 == entries 4 == len(range(1, 3) ===> '#1000' (so +1)
55 for x in range(1000 - 4 - 1):
56 self.history.forward()
57 self.assertEqual(self.history.forward(), "#999")
58
59 def test_append(self):
60 self.history.append('print "foo\n"\n')

Callers

nothing calls this directly

Calls 2

firstMethod · 0.80
forwardMethod · 0.80

Tested by

no test coverage detected