Есть ли рекомендуемый способ добиться такого поведения в PyTest?
Я использую следующую версию:
- Python: 3.8.10
Pytest 8.1.1< /li>
import pytest
def test_executable_script():
result = subprocess.check_output([executable_script], encoding="UTF-8")
assert result != "", f"Error: {result}"
result_2 = subprocess.check_output([another_executable_script], encoding="UTF-8")
assert result != "", f"Error: {result}"
Подробнее здесь: https://stackoverflow.com/questions/783 ... plit-tests