Created new unittest model.
Separete unittest for module.
Only run unittest for compiled modules.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>,
Luciano Wolf <luciano.wolf@openbossa.org>
This commit is contained in:
parent
471486732b
commit
ab918abc1e
211 changed files with 241 additions and 79 deletions
|
|
@ -1,31 +0,0 @@
|
|||
'''Test cases for QDeclarativeView'''
|
||||
|
||||
import unittest
|
||||
|
||||
from PySide.QtCore import QUrl, QStringList, QVariant
|
||||
from PySide.QtGui import QPushButton
|
||||
from PySide.QtDeclarative import QDeclarativeView
|
||||
|
||||
from helper import adjust_filename, TimedQApplication
|
||||
|
||||
|
||||
class TestQDeclarativeView(TimedQApplication):
|
||||
|
||||
def testQDeclarativeViewList(self):
|
||||
view = QDeclarativeView()
|
||||
|
||||
dataList = QStringList(["Item 1", "Item 2", "Item 3", "Item 4"])
|
||||
|
||||
ctxt = view.rootContext()
|
||||
ctxt.setContextProperty("myModel", dataList)
|
||||
|
||||
url = QUrl.fromLocalFile(adjust_filename('view.qml', __file__))
|
||||
view.setSource(url)
|
||||
view.show()
|
||||
|
||||
self.assertEqual(view.status(), QDeclarativeView.Ready)
|
||||
|
||||
self.app.exec_()
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue