Updated QtCore modue to works with python 2.x and 3.x

This commit is contained in:
Renato Filho 2011-10-06 11:36:24 -03:00 • committed by Hugo Parente Lima
commit edaefbce48
8 changed files with 25 additions and 23 deletions

View file

@ -25,7 +25,7 @@ class TranslationTest(UsesQCoreApplication):
obj = QObject()
obj.setObjectName(obj.tr('Hello World!'))
self.assertEqual(obj.objectName(), py3k.unicode('Orbis, te saluto!'))
self.assertEqual(obj.objectName(), py3k.unicode_('Orbis, te saluto!'))
def testRussian(self):
#Set string value to Russian
@ -35,7 +35,7 @@ class TranslationTest(UsesQCoreApplication):
obj = QObject()
obj.setObjectName(obj.tr('Hello World!'))
self.assertEqual(obj.objectName(), py3k.unicode('привет мир!'))
self.assertEqual(obj.objectName(), py3k.unicode_('привет мир!'))
def testUtf8(self):
translator = QTranslator()
@ -44,7 +44,7 @@ class TranslationTest(UsesQCoreApplication):
obj = QObject()
obj.setObjectName(obj.trUtf8('Hello World!'))
self.assertEqual(obj.objectName(), py3k.unicode('привет мир!'))
self.assertEqual(obj.objectName(), py3k.unicode_('привет мир!'))
def testTranslateWithNoneDisambiguation(self):
value = 'String here'