summaryrefslogtreecommitdiffstats
path: root/tests/QtUiTools/bug_965.py
blob: 4dbd281d673001a06d55ea3d7f1ea572e0c2f291 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from PySide.QtUiTools import QUiLoader
import unittest

from helper import UsesQApplication
from helper import adjust_filename

class MyQUiLoader(QUiLoader):
    def __init__(self):
        super(MyQUiLoader, self).__init__()

    def createWidget(self, className, parent=None, name=""):
        return None

class BugTest(UsesQApplication):
    def testCase(self):
        loader = MyQUiLoader()
        self.assertRaises(RuntimeError, loader.load, adjust_filename('bug_965.ui', __file__))

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