summaryrefslogtreecommitdiffstats
path: root/tests
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
parenta82deb1de29320159c8614c2c62c96e176d32771 (diff)
downloadpyside-b7f36fec396631cf61ecc801e55df73a2ef55857.tar.gz
pyside-b7f36fec396631cf61ecc801e55df73a2ef55857.tar.xz
pyside-b7f36fec396631cf61ecc801e55df73a2ef55857.zip
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')
-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 9aafe75..cad84f1 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 0000000..984982d
--- /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()