testing/mozbase/mozprocess/tests/test_mozprocess_misc.py

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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()

mercurial