aboutsummaryrefslogtreecommitdiffstats
path: root/tests/signals
diff options
context:
space:
mode:
authorLauro Neto <lauro.neto@openbossa.org>2010-10-25 18:12:45 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2010-10-26 13:49:07 -0300
commitb7f36fec396631cf61ecc801e55df73a2ef55857 (patch)
tree1e2196a53ba49e35455823841fa539fe8dd2ff58 /tests/signals
parenta82deb1de29320159c8614c2c62c96e176d32771 (diff)
Remove releaseWrapper as Signal tp_dealloc
It was being called when the Signal was garbage collected, resulting in a segfault. Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Reviewer: Renato Filho <renato.filho@openbossa.org>
Diffstat (limited to 'tests/signals')
-rw-r--r--tests/signals/CMakeLists.txt1
-rw-r--r--tests/signals/leaking_signal_test.py16
2 files changed, 17 insertions, 0 deletions
diff --git a/tests/signals/CMakeLists.txt b/tests/signals/CMakeLists.txt
index 9aafe75e9..cad84f1a0 100644
--- a/tests/signals/CMakeLists.txt
+++ b/tests/signals/CMakeLists.txt
@@ -7,6 +7,7 @@ PYSIDE_TEST(invalid_callback_test.py)
PYSIDE_TEST(lambda_gui_test.py)
PYSIDE_TEST(lambda_test.py)
PYSIDE_TEST(list_signal_test.py)
+PYSIDE_TEST(leaking_signal_test.py)
PYSIDE_TEST(multiple_connections_gui_test.py)
PYSIDE_TEST(multiple_connections_test.py)
PYSIDE_TEST(pysignal_test.py)
diff --git a/tests/signals/leaking_signal_test.py b/tests/signals/leaking_signal_test.py
new file mode 100644
index 000000000..984982d80
--- /dev/null
+++ b/tests/signals/leaking_signal_test.py
@@ -0,0 +1,16 @@
+
+import unittest
+from PySide import QtCore
+import weakref
+
+class LeakingSignal(unittest.TestCase):
+
+ def testLeakingSignal(self):
+ # Was segfaulting when the signal was garbage collected.
+ class Emitter(QtCore.QObject):
+ my_signal = QtCore.Signal(object)
+
+ emitter = Emitter()
+
+if __name__ == '__main__':
+ unittest.main()