summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2011-05-23 11:43:24 -0300
committerRenato Filho <renato.filho@openbossa.org>2011-05-23 17:43:42 -0300
commit774223adbdf3a6287f99c6828ef00c033018d174 (patch)
tree1e11b354538af57df2fc52d6ed22cd2572749784
parent959aa385f576aca35f86fc04f8336e6a4ce044f1 (diff)
downloadpyside-774223adbdf3a6287f99c6828ef00c033018d174.tar.gz
pyside-774223adbdf3a6287f99c6828ef00c033018d174.tar.xz
pyside-774223adbdf3a6287f99c6828ef00c033018d174.zip
Check if the same python object arrive on destroyed signal.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Hugo Parente Lima <hugo.pl@gmail.com>
-rw-r--r--tests/QtCore/qtimer_timeout_test.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/QtCore/qtimer_timeout_test.py b/tests/QtCore/qtimer_timeout_test.py
index 8dfe395..5b833fd 100644
--- a/tests/QtCore/qtimer_timeout_test.py
+++ b/tests/QtCore/qtimer_timeout_test.py
@@ -3,6 +3,7 @@
import unittest
import os
+import sys
from tempfile import mkstemp
from PySide.QtCore import QObject, QTimer, SIGNAL
from helper import UsesQCoreApplication
@@ -44,6 +45,7 @@ class TestTimeoutSignal(UsesQCoreApplication):
def testTimeoutSignal(self):
#Test the QTimer timeout() signal
+ refCount = sys.getrefcount(self.timer)
QObject.connect(self.timer, SIGNAL('timeout()'), self.callback)
self.timer.start(4)
self.watchdog.startTimer(10)
@@ -51,6 +53,7 @@ class TestTimeoutSignal(UsesQCoreApplication):
self.app.exec_()
self.assert_(self.called)
+ self.assertEqual(sys.getrefcount(self.timer), refCount)
if __name__ == '__main__':
unittest.main()