aboutsummaryrefslogtreecommitdiffstats
path: root/tests/QtGui/wrong_return_test.py
blob: d14ac9e98d45f2e911e5cf3fa2d9f41ccef3bb21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
'''Test cases for Virtual functions with wrong return type'''

import unittest

from PySide import QtCore, QtGui

from helper import UsesQApplication

class MyWidget(QtGui.QWidget):
    def __init__(self, parent=None):
        super(MyWidget, self).__init__(parent)

    def sizeHint(self):
        pass

class testCase(UsesQApplication):

    def testVirtualReturn(self):
        w = MyWidget()
        self.assertRaises(TypeError, w.show)

if __name__ == '__main__':
    unittest.main()