Created unittest to bug 307.
This commit is contained in:
parent
4e6d901bf8
commit
2593f9fccc
2 changed files with 28 additions and 0 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
PYSIDE_TEST(api2_test.py)
|
PYSIDE_TEST(api2_test.py)
|
||||||
PYSIDE_TEST(bug_243.py)
|
PYSIDE_TEST(bug_243.py)
|
||||||
|
PYSIDE_TEST(bug_307.py)
|
||||||
PYSIDE_TEST(add_action_test.py)
|
PYSIDE_TEST(add_action_test.py)
|
||||||
PYSIDE_TEST(customproxywidget_test.py)
|
PYSIDE_TEST(customproxywidget_test.py)
|
||||||
PYSIDE_TEST(float_to_int_implicit_conversion_test.py)
|
PYSIDE_TEST(float_to_int_implicit_conversion_test.py)
|
||||||
|
|
|
||||||
27
tests/QtGui/bug_307.py
Normal file
27
tests/QtGui/bug_307.py
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
|
||||||
|
import unittest
|
||||||
|
import colorsys
|
||||||
|
|
||||||
|
from PySide.QtCore import SIGNAL
|
||||||
|
from PySide.QtGui import QPushButton, QApplication
|
||||||
|
|
||||||
|
|
||||||
|
class Test (QApplication) :
|
||||||
|
def __init__(self, argv) :
|
||||||
|
super(Test, self).__init__(argv)
|
||||||
|
self._called = False
|
||||||
|
|
||||||
|
def called(self):
|
||||||
|
self._called = True
|
||||||
|
|
||||||
|
|
||||||
|
class QApplicationSignalsTest(unittest.TestCase):
|
||||||
|
def testQuit(self):
|
||||||
|
app = Test([])
|
||||||
|
button = QPushButton("BUTTON")
|
||||||
|
app.connect(button, SIGNAL("clicked()"), app.called)
|
||||||
|
button.click()
|
||||||
|
self.assert_(app._called)
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main()
|
||||||
Loading…
Add table
Add a link
Reference in a new issue