From 3dbefa71785bf61b8f28d4a780064f3f4e04dcb5 Mon Sep 17 00:00:00 2001 From: hut Date: Thu, 17 Dec 2009 19:35:15 +0100 Subject: extended history by a couple of methods --- test/tc_history.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'test') diff --git a/test/tc_history.py b/test/tc_history.py index e3377532..18f71e35 100644 --- a/test/tc_history.py +++ b/test/tc_history.py @@ -13,23 +13,26 @@ class Test(TestCase): hist.back() - self.assertEqual(4, hist.top()) + self.assertEqual(4, hist.current()) self.assertEqual([3,4], list(hist)) + self.assertEqual(5, hist.top()) + hist.back() - self.assertEqual(3, hist.top()) + self.assertEqual(3, hist.current()) self.assertEqual([3], list(hist)) - # no change if top == bottom - self.assertEqual(hist.top(), hist.bottom()) - last_top = hist.top() + # no change if current == bottom + self.assertEqual(hist.current(), hist.bottom()) + last = hist.current() hist.back() - self.assertEqual(hist.top(), last_top) + self.assertEqual(hist.current(), last) + self.assertEqual(5, hist.top()) hist.forward() hist.forward() - self.assertEqual(5, hist.top()) + self.assertEqual(5, hist.current()) self.assertEqual([3,4,5], list(hist)) -- cgit 1.4.1-2-gfad0