diff options
author | Renato Filho <renato.filho@openbossa.org> | 2011-07-25 18:38:39 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:54:40 -0300 |
commit | 3482e2c114c7a9c639ad9ffc6710f1104c2c704c (patch) | |
tree | d594889788dc463f57fed14941bbb3340ea4132e /tests | |
parent | 7de55917c9992d6594f503a1af8553fbccf054f2 (diff) |
Update bug_931 unit test to check for isinstance.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Lauro Neto <lauro.neto@openbossa.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/QtCore/bug_931.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/QtCore/bug_931.py b/tests/QtCore/bug_931.py index 0f0206ac9..32a33ac80 100644 --- a/tests/QtCore/bug_931.py +++ b/tests/QtCore/bug_931.py @@ -2,6 +2,8 @@ import unittest from PySide.QtCore import QObject, Signal o = QObject() +class MyObject(QObject): + s = Signal(int) class CheckSignalType(unittest.TestCase): def testSignal(self): @@ -11,5 +13,9 @@ class CheckSignalType(unittest.TestCase): self.assertEqual(type(o.destroyed).__name__, "SignalInstance") self.assertNotEqual(type(o.destroyed), Signal) + self.assertTrue(isinstance(o.destroyed, Signal)) + self.assertTrue(isinstance(MyObject.s, Signal)) + self.assertFalse(isinstance(int, Signal)) + if __name__ == '__main__': unittest.main() |