summary refs log tree commit diff stats
path: root/test/tc_history.py
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-12-17 19:35:15 +0100
committerhut <hut@lavabit.com>2009-12-17 19:35:15 +0100
commit3dbefa71785bf61b8f28d4a780064f3f4e04dcb5 (patch)
treed2272b52303287ece416c33d568d24f15234ff84 /test/tc_history.py
parent16246965082ce5d319f5cef07da3ff533ca50cc2 (diff)
downloadranger-3dbefa71785bf61b8f28d4a780064f3f4e04dcb5.tar.gz
extended history by a couple of methods
Diffstat (limited to 'test/tc_history.py')
-rw-r--r--test/tc_history.py17
1 files changed, 10 insertions, 7 deletions
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))
 
 
href='#n173'>173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205