summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/QtSql/qvarianttype_test.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/tests/QtSql/qvarianttype_test.py b/tests/QtSql/qvarianttype_test.py
index 7eae67f..89364e5 100644
--- a/tests/QtSql/qvarianttype_test.py
+++ b/tests/QtSql/qvarianttype_test.py
@@ -1,18 +1,18 @@
'''Test cases for QVariant::Type converter'''
import unittest
-from PySide.QtCore import *
-from PySide.QtSql import *
+import py3kcompat as py3k
+from PySide.QtSql import QSqlField
class QVariantTypeTest(unittest.TestCase):
def testQVariantType(self):
- f = QSqlField("name", unicode)
- self.assertEqual(f.type(), unicode)
+ f = QSqlField("name", str)
+ self.assertEqual(f.type(), py3k.unicode)
f = QSqlField("name", str)
- self.assertEqual(f.type(), unicode)
+ self.assertEqual(f.type(), py3k.unicode)
f = QSqlField("name", "QString")
- self.assertEqual(f.type(), unicode)
+ self.assertEqual(f.type(), py3k.unicode)
f = QSqlField("name", "double")
self.assertEqual(f.type(), float)
@@ -23,8 +23,9 @@ class QVariantTypeTest(unittest.TestCase):
f = QSqlField("name", int)
self.assertEqual(f.type(), int)
- f = QSqlField("name", long)
- self.assertEqual(f.type(), int) # long isn't registered in QVariant:Type, just in QMetaType::Type
+ if not py3k.IS_PY3K:
+ f = QSqlField("name", long)
+ self.assertEqual(f.type(), int) # long isn't registered in QVariant:Type, just in QMetaType::Type
#f = QSqlField("name", QObject)
#self.assertEqual(f.type(), None)