]> git.llucax.com Git - software/pymin.git/commitdiff
Add an example of process waiting to testcase.
authorLeandro Lucarella <llucax@gmail.com>
Sat, 17 May 2008 04:36:34 +0000 (01:36 -0300)
committerLeandro Lucarella <llucax@gmail.com>
Wed, 21 May 2008 16:01:56 +0000 (13:01 -0300)
This provides an example on how to access to the subprocess.Popen
associated to a procman.ProcessInfo object.

pymin/procman.py

index 9e3cc92404df050e9d66c053fbeac1c823029599..f6a393dc03325425ef03d84d72900583183f849e 100644 (file)
@@ -275,3 +275,9 @@ if __name__ == '__main__':
     assert 'test-once' not in manager.services
     assert 'test-once' not in manager.namemap
 
+    call('test-wait', ('sleep', '2'))
+    print 'test-wait returned?', get('test-wait').process.poll()
+    print 'Waiting test-wait to return...'
+    ret = get('test-wait').process.wait()
+    print 'Done! returned:', ret
+