Created unit test for bug #312.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com>
Luciano Wolf <luciano.wolf@openbossa.org>
This commit is contained in:
parent
42f9176669
commit
3edeee197a
2 changed files with 24 additions and 0 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
PYSIDE_TEST(args_dont_match_test.py)
|
PYSIDE_TEST(args_dont_match_test.py)
|
||||||
PYSIDE_TEST(bug_311.py)
|
PYSIDE_TEST(bug_311.py)
|
||||||
|
PYSIDE_TEST(bug_312.py)
|
||||||
PYSIDE_TEST(bug_319.py)
|
PYSIDE_TEST(bug_319.py)
|
||||||
PYSIDE_TEST(decorators_test.py)
|
PYSIDE_TEST(decorators_test.py)
|
||||||
PYSIDE_TEST(invalid_callback_test.py)
|
PYSIDE_TEST(invalid_callback_test.py)
|
||||||
|
|
|
||||||
23
tests/signals/bug_312.py
Normal file
23
tests/signals/bug_312.py
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
import unittest
|
||||||
|
from PySide.QtCore import QObject, SIGNAL
|
||||||
|
|
||||||
|
class MultipleSlots(unittest.TestCase):
|
||||||
|
def myCB(self):
|
||||||
|
self._count += 1
|
||||||
|
|
||||||
|
def testUnboundSignal(self):
|
||||||
|
o = QObject()
|
||||||
|
self._count = 0
|
||||||
|
for i in range(200):
|
||||||
|
QObject.connect(o, SIGNAL("fire()"), lambda: self.myCB())
|
||||||
|
|
||||||
|
o.emit(SIGNAL("fire()"))
|
||||||
|
self.assertEqual(self._count, 200)
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main()
|
||||||
|
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue