aboutsummaryrefslogtreecommitdiffstats
path: root/tests/QtCore
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-07-21 17:12:49 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:54:38 -0300
commit5902ca2e66913a374cbfde629b97807e4e2b4bc4 (patch)
treebab526d03b10f6f51eb5572bd70075253c128410 /tests/QtCore
parent0b6bafdd447f56c9910a41f039f9ed1431af04ee (diff)
Fix bug 937 - "missing pid method in QProcess"
Diffstat (limited to 'tests/QtCore')
-rw-r--r--tests/QtCore/qprocess_test.py12
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()