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,27 +0,0 @@
|
|||
import unittest
|
||||
|
||||
from PySide import QtCore, QtGui
|
||||
from helper import UsesQApplication, TimedQApplication
|
||||
|
||||
class TestInputDialog(TimedQApplication):
|
||||
|
||||
def testGetDouble(self):
|
||||
self.assertEquals(QtGui.QInputDialog.getDouble(None, "title", "label"), (0.0, False))
|
||||
|
||||
def testGetInt(self):
|
||||
self.assertEquals(QtGui.QInputDialog.getInt(None, "title", "label"), (0, False))
|
||||
|
||||
def testGetInteger(self):
|
||||
self.assertEquals(QtGui.QInputDialog.getInteger(None, "title", "label"), (0, False))
|
||||
|
||||
def testGetItem(self):
|
||||
(item, bool) = QtGui.QInputDialog.getItem(None, "title", "label", QtCore.QStringList(["1", "2", "3"]))
|
||||
self.assertEquals(str(item), "1")
|
||||
|
||||
def testGetText(self):
|
||||
(text, bool) = QtGui.QInputDialog.getText(None, "title", "label")
|
||||
self.assertEquals(str(text),"")
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue