aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBruno dos Santos de Araujo <bruno.araujo@openbossa.org>2010-02-18 16:18:33 -0400
committerMarcelo Lira <marcelo.lira@openbossa.org>2010-02-19 18:13:11 -0300
commitfc68cd2248106e64fa1a00743c2ec56edf2effe0 (patch)
treeeb4472caccff1318bb5730921d25120dd9282730 /tests
parent65f6f78008d4f961c9ebe5d8047b0f2c742fe15f (diff)
Use assert() functions in the unit tests for the sake of standardization
Diffstat (limited to 'tests')
-rwxr-xr-xtests/qtgui/qgraphicsitem_isblocked_test.py7
-rw-r--r--tests/qtgui/qinputdialog_get_test.py12
2 files changed, 11 insertions, 8 deletions
diff --git a/tests/qtgui/qgraphicsitem_isblocked_test.py b/tests/qtgui/qgraphicsitem_isblocked_test.py
index 304a2be75..c16e64a5c 100755
--- a/tests/qtgui/qgraphicsitem_isblocked_test.py
+++ b/tests/qtgui/qgraphicsitem_isblocked_test.py
@@ -2,7 +2,8 @@
import unittest
-from PySide import QtGui, QtCore
+from PySide import QtCore
+from PySide import QtGui
from helper import UsesQApplication
class Item(QtGui.QGraphicsItem):
@@ -21,8 +22,8 @@ class Item(QtGui.QGraphicsItem):
class QGraphicsViewIsBlockedTest(UsesQApplication):
def testIsBlockedByModalPanel(self):
- item = Item()
- item.isBlockedByModalPanel()
+ (bool, object) = Item().isBlockedByModalPanel()
+ self.assertFalse(bool)
if __name__ == "__main__":
unittest.main()
diff --git a/tests/qtgui/qinputdialog_get_test.py b/tests/qtgui/qinputdialog_get_test.py
index 5b2b66ed4..c75f71251 100644
--- a/tests/qtgui/qinputdialog_get_test.py
+++ b/tests/qtgui/qinputdialog_get_test.py
@@ -6,19 +6,21 @@ from helper import UsesQApplication, TimedQApplication
class TestInputDialog(TimedQApplication):
def testGetDouble(self):
- QtGui.QInputDialog.getDouble(None, "title", "label")
+ self.assertEquals(QtGui.QInputDialog.getDouble(None, "title", "label"), (0.0, False))
def testGetInt(self):
- QtGui.QInputDialog.getInt(None, "title", "label")
+ self.assertEquals(QtGui.QInputDialog.getInt(None, "title", "label"), (0, False))
def testGetInteger(self):
- QtGui.QInputDialog.getInteger(None, "title", "label")
+ self.assertEquals(QtGui.QInputDialog.getInteger(None, "title", "label"), (0, False))
def testGetItem(self):
- QtGui.QInputDialog.getItem(None, "title", "label", QtCore.QStringList(["1", "2", "3"]))
+ (item, bool) = QtGui.QInputDialog.getItem(None, "title", "label", QtCore.QStringList(["1", "2", "3"]))
+ self.assertEquals(str(item), "1")
def testGetText(self):
- QtGui.QInputDialog.getText(None, "title", "label")
+ (text, bool) = QtGui.QInputDialog.getText(None, "title", "label")
+ self.assertEquals(str(text),"")
if __name__ == '__main__':
unittest.main()