Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 #!/usr/bin/env python
3 import os
4 import time
5 import unittest
6 import proctest
7 from mozprocess import processhandler
9 here = os.path.dirname(os.path.abspath(__file__))
11 class ProcTestMisc(proctest.ProcTest):
12 """ Class to test misc operations """
14 def test_process_output_twice(self):
15 """
16 Process is started, then processOutput is called a second time explicitly
17 """
18 p = processhandler.ProcessHandler([self.python, self.proclaunch,
19 "process_waittimeout_10s_python.ini"],
20 cwd=here)
22 p.run()
23 p.processOutput(timeout=5)
24 p.wait()
26 detected, output = proctest.check_for_process(self.proclaunch)
27 self.determine_status(detected,
28 output,
29 p.proc.returncode,
30 p.didTimeout,
31 False,
32 ())
34 if __name__ == '__main__':
35 unittest.main()