Raise if process has already exited, kill and raise if self.error is not empty
(self)
| 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() |
nothing calls this directly
no test coverage detected