We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b83fe16 commit d511861Copy full SHA for d511861
tests/test_sys_exit.py
@@ -1,23 +1,18 @@
1
import subprocess
2
3
+import pytest
4
+
5
6
def test_correct_sys_exit_error_python():
- try:
7
+ with pytest.raises(subprocess.CalledProcessError):
8
subprocess.run(
9
["stac-validator", "tests/test_data/bad_data/bad_item_v090.json"],
10
check=True,
11
)
- assert False
- except subprocess.CalledProcessError:
12
- assert True
13
14
15
def test_false_sys_exit_error_python():
16
17
- subprocess.run(
18
- ["stac-validator", "tests/test_data/v090/items/good_item_v090.json"],
19
- check=True,
20
- )
21
22
23
+ subprocess.run(
+ ["stac-validator", "tests/test_data/v090/items/good_item_v090.json"],
+ check=True,
+ )
0 commit comments