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:
Lauro Neto 2010-02-01 18:00:43 -03:00 • committed by Hugo Lima
commit 74351882b5
13 changed files with 291 additions and 45 deletions

View file

@ -8,11 +8,9 @@ from PySide.QtCore import *
class TestQProcess (unittest.TestCase):
def testStartDetached(self):
tuple_ = QProcess.startDetached("dir", [], os.getcwd())
self.assertEquals(tuple, tuple_.__class__)
(value, pid) = tuple_
self.assertEquals(bool, value.__class__)
self.assertEqual(long, pid.__class__)
value, pid = QProcess.startDetached("dir", [], os.getcwd())
self.assert_(isinstance(value, bool))
self.assert_(isinstance(pid, long))
if __name__ == '__main__':
unittest.main()