blob: 5717d457c20141635545d00380b2931966a23b1a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
import unittest
import os
from helper import UsesQApplication
from PySide import QtCore, QtGui, QtDeclarative
from PySide.QtUiTools import QUiLoader
class BugTest(UsesQApplication):
def testCase(self):
w = QtGui.QWidget()
loader = QUiLoader()
filePath = os.path.join(os.path.dirname(__file__), 'action.ui')
result = loader.load(filePath, w)
self.assertEqual(type(result.statusbar.actionFoo), QtGui.QAction)
def testCustomWidgets(self):
w = QtGui.QWidget()
loader = QUiLoader()
filePath = os.path.join(os.path.dirname(__file__), 'customwidget.ui')
result = loader.load(filePath, w)
self.assert_(type(result.declarativeView), QtDeclarative.QDeclarativeView)
self.assert_(type(result.worldTimeClock), QtGui.QWidget)
if __name__ == '__main__':
unittest.main()
|