Fixing several tests
Using isinstance instead of comparing classes names Removing unnecessary tuple check, treated by the return value unpacking Adding missing inject code tests Adding qfile.getchar test Fixing QLocale.to* methods fixing __setitem__ in qbytearray
This commit is contained in:
parent
76529055ff
commit
74351882b5
13 changed files with 291 additions and 45 deletions
|
|
@ -42,6 +42,16 @@ class TranslationTest(UsesQCoreApplication):
|
|||
obj.setObjectName(obj.tr('Hello World!'))
|
||||
self.assertEqual(obj.objectName(), u'привет мир!')
|
||||
|
||||
def testUtf8(self):
|
||||
translator = QTranslator()
|
||||
translator.load(os.path.join(self.trdir, 'trans_russian.qm'))
|
||||
self.app.installTranslator(translator)
|
||||
|
||||
obj = QObject()
|
||||
obj.setObjectName(obj.trUtf8('Hello World!'))
|
||||
self.assertEqual(obj.objectName(), u'привет мир!')
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue