diff options
author | Hugo Parente Lima <hugo.lima@openbossa.org> | 2010-06-03 15:34:17 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.lima@openbossa.org> | 2010-06-10 14:57:41 -0300 |
commit | e39bfefde9edda662f51eeaf9a482f209c7f1217 (patch) | |
tree | a4add52f8ca3460fcaed99c6d9c7fc810f341a49 /tests/QtGui | |
parent | 24a944590663582df72aefd1929ec19ba3c6414f (diff) |
Remove wrapper for classes: QString, QStringRef, QLatin1String, QStringMatcher, QChar and QLatin1Char.
Diffstat (limited to 'tests/QtGui')
-rw-r--r-- | tests/QtGui/qinputdialog_get_test.py | 2 | ||||
-rw-r--r-- | tests/QtGui/qpixmap_test.py | 2 | ||||
-rw-r--r-- | tests/QtGui/qstring_qkeysequence_test.py | 15 |
3 files changed, 5 insertions, 14 deletions
diff --git a/tests/QtGui/qinputdialog_get_test.py b/tests/QtGui/qinputdialog_get_test.py index c75f71251..ce3a60dfa 100644 --- a/tests/QtGui/qinputdialog_get_test.py +++ b/tests/QtGui/qinputdialog_get_test.py @@ -15,7 +15,7 @@ class TestInputDialog(TimedQApplication): 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"])) + (item, bool) = QtGui.QInputDialog.getItem(None, "title", "label", ["1", "2", "3"]) self.assertEquals(str(item), "1") def testGetText(self): diff --git a/tests/QtGui/qpixmap_test.py b/tests/QtGui/qpixmap_test.py index 481409462..7ba7454d4 100644 --- a/tests/QtGui/qpixmap_test.py +++ b/tests/QtGui/qpixmap_test.py @@ -16,7 +16,7 @@ class QPixmapTest(UsesQApplication): self.assert_(pixmap.size().height(), 20) def testQStringConstructor(self): - pixmap = QPixmap(QString("Testing!")) + pixmap = QPixmap("Testing!") def testQVariantConstructor2(self): v = QVariant(QPixmap()) diff --git a/tests/QtGui/qstring_qkeysequence_test.py b/tests/QtGui/qstring_qkeysequence_test.py index 1f435e6ee..15db935af 100644 --- a/tests/QtGui/qstring_qkeysequence_test.py +++ b/tests/QtGui/qstring_qkeysequence_test.py @@ -5,7 +5,7 @@ import unittest from helper import UsesQApplication -from PySide.QtCore import QString +from PySide.QtCore import * from PySide.QtGui import QKeySequence, QAction class QStringQKeySequenceTest(UsesQApplication): @@ -14,21 +14,12 @@ class QStringQKeySequenceTest(UsesQApplication): def testQStringFromQKeySequence(self): '''Creates a QString from a QKeySequence.''' keyseq = 'Ctrl+A' - a = QString(QKeySequence(keyseq)) + a = QKeySequence(keyseq) self.assertEqual(a, keyseq) - def testQStringAsQKeySequence(self): - '''Passes a QString to an argument expecting a QKeySequence.''' - keyseq = QString('Ctrl+A') - action = QAction(None) - action.setShortcut(keyseq) - shortcut = action.shortcut() - self.assert_(isinstance(shortcut, QKeySequence)) - self.assertEqual(shortcut.toString(), keyseq) - def testPythonStringAsQKeySequence(self): '''Passes a Python string to an argument expecting a QKeySequence.''' - keyseq = 'Ctrl+A' + keyseq = u'Ctrl+A' action = QAction(None) action.setShortcut(keyseq) shortcut = action.shortcut() |