[pyatspi2] Add test for GetMatchesTo with count == 1
- From: Mike Gorse <mgorse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pyatspi2] Add test for GetMatchesTo with count == 1
- Date: Fri, 16 Apr 2010 17:48:32 +0000 (UTC)
commit 74cf852fb488b23a12ec3d8ac86fdeb621e0c6e0
Author: Mike Gorse <mgorse novell com>
Date: Sat Apr 10 16:05:00 2010 -0400
Add test for GetMatchesTo with count == 1
Add regression test for BGO#538680: collection.getMatchesTo() seems to
ignore the count.
Also remove debugging message from collection test.
tests/pyatspi/collectiontest.py | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/tests/pyatspi/collectiontest.py b/tests/pyatspi/collectiontest.py
index 87341c0..503aafe 100644
--- a/tests/pyatspi/collectiontest.py
+++ b/tests/pyatspi/collectiontest.py
@@ -46,9 +46,7 @@ class AccessibleTest(_PasyTest):
self._registry = pyatspi.Registry()
print self._path
self._desktop = self._registry.getDesktop(0)
- print "dbg: getting root"
self.root = pyatspi.findDescendant (self._desktop, lambda x: x.name == "main" and x.getRole() == pyatspi.ROLE_WINDOW)
- print "root: ", self.root
def assertObjects(self,test,obj,vars,msg):
test.assertEqual(len(obj), len(vars) / 2, msg + " length")
@@ -100,6 +98,10 @@ class AccessibleTest(_PasyTest):
"gnome-settings-daemon", 79,
"gnome-panel", 79,
), " getMatchesTo ")
+ ret = collection.getMatchesTo (obj, rule, collection.SORT_ORDER_REVERSE_CANONICAL, collection.TREE_INORDER, True, 1, True)
+ self.assertObjects(test,ret,(
+ "gnome-panel", 79,
+ ), " getMatchesTo w/count=1")
ret = collection.getMatchesFrom (obj, rule, collection.SORT_ORDER_REVERSE_CANONICAL, collection.TREE_INORDER, 5, True)
self.assertObjects(test,ret,(
"tracker-applet", 79,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]