diff options
Diffstat (limited to 'tests/QtCore')
-rw-r--r-- | tests/QtCore/qprocess_test.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/QtCore/qprocess_test.py b/tests/QtCore/qprocess_test.py index b01c68ba3..19d47f68a 100644 --- a/tests/QtCore/qprocess_test.py +++ b/tests/QtCore/qprocess_test.py @@ -12,5 +12,17 @@ class TestQProcess (unittest.TestCase): self.assert_(isinstance(value, bool)) self.assert_(isinstance(pid, long)) + def testPid(self): + p = QProcess() + p.start("dir") + p.waitForStarted() + pid = p.pid() + # We can't test the pid method result because it returns 0 when the + # process isn't running + if p.state() == QProcess.Running: + self.assertNotEqual(pid, 0) + else: + print "PROCESS ALREADY DEAD :-/" + if __name__ == '__main__': unittest.main() |