MCPcopy Create free account
hub / github.com/apache/qpid-proton / __init__

Method __init__

tests/py/test_subprocess.py:53–65  ·  view source on GitHub ↗

Takes all args and kwargs of subprocess.Popen except stdout, stderr, universal_newlines kill_me=True runs check_kill() in __exit__() instead of check_wait()

(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

51 """
52
53 def __init__(self, *args, **kwargs):
54 """
55 Takes all args and kwargs of subprocess.Popen except stdout, stderr, universal_newlines
56 kill_me=True runs check_kill() in __exit__() instead of check_wait()
57 """
58 self.on_exit = self.check_kill if kwargs.pop('kill_me', False) else self.check_wait
59 self.errfile = tempfile.NamedTemporaryFile(delete=False)
60 kwargs.update({'universal_newlines': True, 'stdout': PIPE, 'stderr': self.errfile})
61 prefix = os.environ.get("TEST_EXE_PREFIX")
62 if prefix:
63 args = [prefix.split() + args[0]] + list(args[1:])
64 self.cmd = args[0]
65 super(Popen, self).__init__(*args, **kwargs)
66
67 def check_wait(self):
68 if self.wait() or self.error:

Callers 2

__init__Method · 0.45
__init__Method · 0.45

Calls 4

listFunction · 0.85
popMethod · 0.45
updateMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected