aboutsummaryrefslogtreecommitdiffstats
path: root/tests/QtGui/qinputdialog_get_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/QtGui/qinputdialog_get_test.py')
-rw-r--r--tests/QtGui/qinputdialog_get_test.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/QtGui/qinputdialog_get_test.py b/tests/QtGui/qinputdialog_get_test.py
new file mode 100644
index 000000000..c75f71251
--- /dev/null
+++ b/tests/QtGui/qinputdialog_get_test.py
@@ -0,0 +1,27 @@
+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()
+