testing/mozbase/mozprocess/tests/test_mozprocess_misc.py

Wed, 31 Dec 2014 07:22:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:22:50 +0100
branch
TOR_BUG_3246
changeset 4
fc2d59ddac77
permissions
-rw-r--r--

Correct previous dual key logic pending first delivery installment.

     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