aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-07-14 18:50:51 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:54:36 -0300
commit48a1b539a4c0ca08cda976fa1f68f4fd02f18dd5 (patch)
tree9077fa7e1edca6419b916362c79959f14f0c1aae /tests
parent116a691516c329eb7a0dec31a134e9b58de6b9d8 (diff)
Fix bug 920 - "Cannot use same slot for two signals"
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Renato Araújo <renato.filho@openbossa.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/QtCore/CMakeLists.txt1
-rw-r--r--tests/QtCore/bug_920.py25
2 files changed, 26 insertions, 0 deletions
diff --git a/tests/QtCore/CMakeLists.txt b/tests/QtCore/CMakeLists.txt
index 266c8f94b..2c99cf1b2 100644
--- a/tests/QtCore/CMakeLists.txt
+++ b/tests/QtCore/CMakeLists.txt
@@ -16,6 +16,7 @@ PYSIDE_TEST(bug_820.py)
PYSIDE_TEST(bug_826.py)
PYSIDE_TEST(bug_829.py)
PYSIDE_TEST(bug_835.py)
+PYSIDE_TEST(bug_920.py)
PYSIDE_TEST(bug_927.py)
PYSIDE_TEST(blocking_signals_test.py)
PYSIDE_TEST(classinfo_test.py)
diff --git a/tests/QtCore/bug_920.py b/tests/QtCore/bug_920.py
new file mode 100644
index 000000000..d7365b986
--- /dev/null
+++ b/tests/QtCore/bug_920.py
@@ -0,0 +1,25 @@
+#!/usr/bin/env python
+
+import sys
+import unittest
+import PySide.QtCore as QtCore
+
+class Signaller(QtCore.QObject):
+ s1 = QtCore.Signal()
+ s2 = QtCore.Signal()
+
+class TestBug920(unittest.TestCase):
+
+ def testIt(self):
+ s = Signaller()
+ s.s1.connect(self.onSignal)
+ s.s2.connect(self.onSignal)
+ self.assertTrue(s.s1.disconnect(self.onSignal))
+ self.assertTrue(s.s2.disconnect(self.onSignal))
+
+ def onSignal(self):
+ pass
+
+
+if __name__ == "__main__":
+ unittest.main()