1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
import subprocess
import pytest
def test_correct_sys_exit_error_python():
with pytest.raises(subprocess.CalledProcessError):
subprocess.run(
["stac-validator", "tests/test_data/bad_data/bad_item_v090.json"],
check=True,
)
def test_correct_sys_exit_error_recursion():
with pytest.raises(subprocess.CalledProcessError):
subprocess.run(
[
"stac-validator",
"tests/test_data/v100/catalog-with-bad-item.json",
"--recursive",
"--max-depth",
"10",
],
check=True,
)
def test_false_sys_exit_error_python():
subprocess.run(
["stac-validator", "tests/test_data/v090/items/good_item_v090.json"],
check=True,
)
|