diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2011-07-19 15:58:20 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:54:37 -0300 |
commit | ef45b5a924b921628c1bc3fd7fce18c994430208 (patch) | |
tree | e2662eeeddce33327e8e59b153c86782875cf7a8 /tests/QtGui | |
parent | cab3b37b788cef6fdd999bedbe0ced93c9151ae4 (diff) |
Fixes bug #910 - installEventFilter() increments reference count on target object.
http://bugs.pyside.org/show_bug.cgi?id=910
Also added/fixed unit tests.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'tests/QtGui')
-rw-r--r-- | tests/QtGui/event_filter_test.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/QtGui/event_filter_test.py b/tests/QtGui/event_filter_test.py index 88dbd960b..ec82515da 100644 --- a/tests/QtGui/event_filter_test.py +++ b/tests/QtGui/event_filter_test.py @@ -2,7 +2,7 @@ import unittest import sys from helper import UsesQApplication -from PySide.QtCore import QObject, QEvent, QTimer +from PySide.QtCore import QObject, QEvent from PySide.QtGui import QWidget class MyFilter(QObject): @@ -17,10 +17,10 @@ class EventFilter(UsesQApplication): o = QObject() filt = MyFilter() o.installEventFilter(filt) - self.assertEqual(sys.getrefcount(o), 3) + self.assertEqual(sys.getrefcount(o), 2) o.installEventFilter(filt) - self.assertEqual(sys.getrefcount(o), 3) + self.assertEqual(sys.getrefcount(o), 2) o.removeEventFilter(filt) self.assertEqual(sys.getrefcount(o), 2) |