Check whether the output contains a partial stop str.
(output: str, stop_str: str)
| 297 | |
| 298 | |
| 299 | def is_partial_stop(output: str, stop_str: str): |
| 300 | """Check whether the output contains a partial stop str.""" |
| 301 | for i in range(0, min(len(output), len(stop_str))): |
| 302 | if stop_str.startswith(output[-i:]): |
| 303 | return True |
| 304 | return False |
| 305 | |
| 306 | |
| 307 | def run_cmd(cmd: str): |
no outgoing calls
no test coverage detected
searching dependent graphs…