Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | #!/usr/bin/env python |
michael@0 | 2 | |
michael@0 | 3 | import os |
michael@0 | 4 | import time |
michael@0 | 5 | import unittest |
michael@0 | 6 | import proctest |
michael@0 | 7 | from mozprocess import processhandler |
michael@0 | 8 | |
michael@0 | 9 | here = os.path.dirname(os.path.abspath(__file__)) |
michael@0 | 10 | |
michael@0 | 11 | class ProcTestMisc(proctest.ProcTest): |
michael@0 | 12 | """ Class to test misc operations """ |
michael@0 | 13 | |
michael@0 | 14 | def test_process_output_twice(self): |
michael@0 | 15 | """ |
michael@0 | 16 | Process is started, then processOutput is called a second time explicitly |
michael@0 | 17 | """ |
michael@0 | 18 | p = processhandler.ProcessHandler([self.python, self.proclaunch, |
michael@0 | 19 | "process_waittimeout_10s_python.ini"], |
michael@0 | 20 | cwd=here) |
michael@0 | 21 | |
michael@0 | 22 | p.run() |
michael@0 | 23 | p.processOutput(timeout=5) |
michael@0 | 24 | p.wait() |
michael@0 | 25 | |
michael@0 | 26 | detected, output = proctest.check_for_process(self.proclaunch) |
michael@0 | 27 | self.determine_status(detected, |
michael@0 | 28 | output, |
michael@0 | 29 | p.proc.returncode, |
michael@0 | 30 | p.didTimeout, |
michael@0 | 31 | False, |
michael@0 | 32 | ()) |
michael@0 | 33 | |
michael@0 | 34 | if __name__ == '__main__': |
michael@0 | 35 | unittest.main() |