summaryrefslogtreecommitdiff
path: root/tests/test_overrides.py
diff options
context:
space:
mode:
authorMartin Pitt <martinpitt@gnome.org>2012-04-23 15:24:04 +0200
committerMartin Pitt <martinpitt@gnome.org>2012-05-04 10:25:53 +0200
commit0ed74e4c4da4ed3313d83807b998f4f096aeefcd (patch)
treeb756a539b6c3911495e1f6e96bcd47e8dcfdd331 /tests/test_overrides.py
parent76fdcf201745dc56c6773a8546da53ad562038a7 (diff)
downloadpygobject-0ed74e4c4da4ed3313d83807b998f4f096aeefcd.tar.gz
Add missing override for TreeModel.iter_previous()
This should behave like the override for TreeModel.iter_next(). https://bugzilla.gnome.org/show_bug.cgi?id=660018
Diffstat (limited to 'tests/test_overrides.py')
-rw-r--r--tests/test_overrides.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_overrides.py b/tests/test_overrides.py
index 6f2fbaff..92c615cf 100644
--- a/tests/test_overrides.py
+++ b/tests/test_overrides.py
@@ -1350,6 +1350,8 @@ class TestGtk(unittest.TestCase):
self.assertTrue(tree_store)
self.assertEqual(len(tree_store), 100)
+ self.assertEqual(tree_store.iter_previous(tree_store.get_iter(0)), None)
+
for i,row in enumerate(tree_store):
self.assertEqual(row.model, tree_store)
self.assertEqual(row.parent, None)
@@ -1375,6 +1377,8 @@ class TestGtk(unittest.TestCase):
next = tree_store.iter_next(aiter)
if i < len(tree_store) - 1:
self.assertEqual(tree_store.get_path(next), row.next.path)
+ self.assertEqual(tree_store.get_path(tree_store.iter_previous(next)),
+ tree_store.get_path(aiter))
else:
self.assertEqual(next, None)