Juartaurus's picture
Upload folder using huggingface_hub
1865436
raw
history blame contribute delete
314 Bytes
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)