aboutsummaryrefslogtreecommitdiffstats
path: root/tests/QtCore
diff options
context:
space:
mode:
Diffstat (limited to 'tests/QtCore')
-rw-r--r--tests/QtCore/qobject_parent_test.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/QtCore/qobject_parent_test.py b/tests/QtCore/qobject_parent_test.py
index df8121666..cda6022e8 100644
--- a/tests/QtCore/qobject_parent_test.py
+++ b/tests/QtCore/qobject_parent_test.py
@@ -4,7 +4,7 @@
import unittest
from sys import getrefcount
-from PySide.QtCore import QObject, QTimer
+from PySide.QtCore import *
class ParentRefCountCase(unittest.TestCase):
'''Test case for the refcount changes of setParent'''
@@ -108,6 +108,15 @@ class ParentCase(unittest.TestCase):
self.assertEqual(sorted(target_children), sorted(test_children))
+ # test findChildren default value
+ res = parent.findChildren(QTimer)
+ self.assertEqual(len(res), 20)
+
+ # test findChildre with a regex
+ res = parent.findChildren(QObject, QRegExp("^fo+"))
+ self.assertEqual(sorted(res), sorted(test_children))
+
+
def testParentEquality(self):
#QObject.parent() == parent
parent = QObject()