Spaces:
Build error
Build error
File size: 314 Bytes
1865436 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
from typing import List
import pytest
import sh
def run_command(command: List[str]):
"""Default method for executing shell commands with pytest."""
msg = None
try:
sh.python(command)
except sh.ErrorReturnCode as e:
msg = e.stderr.decode()
if msg:
pytest.fail(msg=msg) |