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

Method check_kill

tests/py/test_subprocess.py:77–86  ·  view source on GitHub ↗

Raise if process has already exited, kill and raise if self.error is not empty

(self)

Source from the content-addressed store, hash-verified

75 return result
76
77 def check_kill(self):
78 """Raise if process has already exited, kill and raise if self.error is not empty"""
79 if self.poll() is None:
80 self.kill()
81 self.wait()
82 self.stdout.close() # Doesn't get closed if killed
83 if self.error:
84 raise TestProcessError(self, "check_kill found error output")
85 else:
86 raise TestProcessError(self, "check_kill process not running")
87
88 def expect(self, pattern):
89 line = self.stdout.readline()

Callers

nothing calls this directly

Calls 3

TestProcessErrorClass · 0.85
waitMethod · 0.65
closeMethod · 0.45

Tested by

no test coverage detected