aboutsummaryrefslogtreecommitdiffstats
path: root/tests/QtCore/qstring_test.py
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2011-10-03 18:49:42 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:56:08 -0300
commit1e29ab65924166688e352eaaa099ad571a980c4f (patch)
tree2a7ae3cb38b33a3211c9cec0da70016dd5d44c1d /tests/QtCore/qstring_test.py
parenta2cb6fe0254a122f0ad9d2ee991d9a249903ee12 (diff)
Initia QtCore port to python3.
Diffstat (limited to 'tests/QtCore/qstring_test.py')
-rw-r--r--tests/QtCore/qstring_test.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/tests/QtCore/qstring_test.py b/tests/QtCore/qstring_test.py
index 1b98de767..9c2d38c49 100644
--- a/tests/QtCore/qstring_test.py
+++ b/tests/QtCore/qstring_test.py
@@ -3,10 +3,8 @@
'''Test cases for QString'''
import unittest
-import ctypes
-import sys
-
-from PySide.QtCore import *
+import py3kcompat as py3k
+from PySide.QtCore import QObject
class QStringConstructor(unittest.TestCase):
'''Test case for QString constructors'''
@@ -14,11 +12,11 @@ class QStringConstructor(unittest.TestCase):
def testQStringDefault(self):
obj = QObject()
obj.setObjectName('foo')
- self.assertEqual(obj.objectName(), u'foo')
- obj.setObjectName(u'áâãà')
- self.assertEqual(obj.objectName(), u'áâãà')
+ self.assertEqual(obj.objectName(), py3k.unicode('foo'))
+ obj.setObjectName(py3k.unicode('áâãà'))
+ self.assertEqual(obj.objectName(), py3k.unicode('áâãà'))
obj.setObjectName(None)
- self.assertEqual(obj.objectName(), u'')
+ self.assertEqual(obj.objectName(), py3k.unicode(''))
if __name__ == '__main__':
unittest.main()