mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
17 lines
412 B
Python
17 lines
412 B
Python
import os
|
|
from subprocess import CalledProcessError
|
|
|
|
import pytest
|
|
|
|
from moulinette.utils.process import run_commands
|
|
|
|
|
|
def test_run_shell_command_list(test_file):
|
|
assert os.path.exists(str(test_file))
|
|
run_commands(["rm -f %s" % str(test_file)])
|
|
assert not os.path.exists(str(test_file))
|
|
|
|
|
|
def test_run_shell_bad_cmd():
|
|
with pytest.raises(CalledProcessError):
|
|
run_commands(["yolo swag"])
|