Files
firefox/testing/mozbase/mozprocess/tests/test_mozprocess_misc.py
T
Julien Pagès df1b0a5c30 Bug 1215756 - Fix mozprocess unit tests failures. r=ahal
This now check process status based on pids, not anymore
on an arbitrary string given in the command line.

Some cleanup in there, including removing code duplicate.
2015-10-21 10:57:58 -04:00

29 lines
752 B
Python

#!/usr/bin/env python
import os
import unittest
import proctest
from mozprocess import processhandler
here = os.path.dirname(os.path.abspath(__file__))
class ProcTestMisc(proctest.ProcTest):
""" Class to test misc operations """
def test_process_output_twice(self):
"""
Process is started, then processOutput is called a second time explicitly
"""
p = processhandler.ProcessHandler([self.python, self.proclaunch,
"process_waittimeout_10s_python.ini"],
cwd=here)
p.run()
p.processOutput(timeout=5)
p.wait()
self.determine_status(p, False, ())
if __name__ == '__main__':
unittest.main()