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
b261ff4642
commit
0e0b99f43a
3 changed files with 48 additions and 0 deletions
|
|
@ -6,5 +6,6 @@ PYSIDE_TEST(bug_552.py)
|
||||||
PYSIDE_TEST(bug_797.py)
|
PYSIDE_TEST(bug_797.py)
|
||||||
PYSIDE_TEST(bug_909.py)
|
PYSIDE_TEST(bug_909.py)
|
||||||
PYSIDE_TEST(bug_913.py)
|
PYSIDE_TEST(bug_913.py)
|
||||||
|
PYSIDE_TEST(bug_965.py)
|
||||||
PYSIDE_TEST(uiloader_test.py)
|
PYSIDE_TEST(uiloader_test.py)
|
||||||
PYSIDE_TEST(ui_test.py)
|
PYSIDE_TEST(ui_test.py)
|
||||||
|
|
|
||||||
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()
|
||||||
27
tests/QtUiTools/bug_965.ui
Normal file
27
tests/QtUiTools/bug_965.ui
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
<ui version="4.0" >
|
||||||
|
<author></author>
|
||||||
|
<comment></comment>
|
||||||
|
<exportmacro></exportmacro>
|
||||||
|
<class>MainWindow</class>
|
||||||
|
<widget class="QMainWindow" name="MainWindow" >
|
||||||
|
<property name="objectName" >
|
||||||
|
<string notr="true" >MainWindow</string>
|
||||||
|
</property>
|
||||||
|
<property name="geometry" >
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>800</width>
|
||||||
|
<height>600</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle" >
|
||||||
|
<string>MainWindow</string>
|
||||||
|
</property>
|
||||||
|
<widget class="QMenuBar" name="menubar" />
|
||||||
|
<widget class="QWidget" name="centralwidget" />
|
||||||
|
<widget class="QStatusBar" name="statusbar" />
|
||||||
|
</widget>
|
||||||
|
<pixmapfunction></pixmapfunction>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue