Default method for executing shell commands with `pytest` and `sh` package. :param command: A list of shell commands as strings.
(command: List[str])
| 9 | |
| 10 | |
| 11 | def run_sh_command(command: List[str]) -> None: |
| 12 | """Default method for executing shell commands with `pytest` and `sh` package. |
| 13 | |
| 14 | :param command: A list of shell commands as strings. |
| 15 | """ |
| 16 | msg = None |
| 17 | try: |
| 18 | sh.python(command) |
| 19 | except sh.ErrorReturnCode as e: |
| 20 | msg = e.stderr.decode() |
| 21 | if msg: |
| 22 | pytest.fail(msg=msg) |
no outgoing calls