Added all original pyside unit tests to the shiboken version.
This commit is contained in:
parent
aa12538d63
commit
9af36fbb64
160 changed files with 6616 additions and 12 deletions
29
tests/signals/invalid_callback_test.py
Normal file
29
tests/signals/invalid_callback_test.py
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
|
||||
'''Test cases for passing invalid callbacks to QObject.connect'''
|
||||
|
||||
import unittest
|
||||
|
||||
from PySide.QtCore import QObject, SIGNAL
|
||||
|
||||
class InvalidCallback(unittest.TestCase):
|
||||
'''Test case for passing an invalid callback to QObject.connect'''
|
||||
|
||||
def setUp(self):
|
||||
#Acquire resources
|
||||
self.obj = QObject()
|
||||
|
||||
def tearDown(self):
|
||||
#Release resources
|
||||
try:
|
||||
del self.obj
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
def testIntegerCb(self):
|
||||
#Test passing an int as callback to QObject.connect
|
||||
self.assertRaises(TypeError, QObject.connect, self.obj,
|
||||
SIGNAL('destroyed()'), 42)
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue