Created unit test for bug #965.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Lauro Neto <lauro.neto@openbossa.org>
This commit is contained in:
parent
bbf66078ea
commit
44c67274f0
3 changed files with 48 additions and 0 deletions
20
tests/QtUiTools/bug_965.py
Normal file
20
tests/QtUiTools/bug_965.py
Normal file
|
|
@ -0,0 +1,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()
|
||||
Loading…
Add table
Add a link
Reference in a new issue