Skip to content

Commit 690bc2d

Browse files
committed
Final test: test the validationerror
1 parent fe0443c commit 690bc2d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/integration/test_main.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ def test_schema_unknown():
3131
main(testargs)
3232

3333

34+
def test_validation_error():
35+
"""SystemExit on running with ValidationError."""
36+
testargs = ['--schema', '3.0.0',
37+
'./tests/integration/data/v2.0/petstore.yaml']
38+
with pytest.raises(SystemExit):
39+
main(testargs)
40+
41+
3442
def test_nonexisting_file():
3543
"""Calling with non-existing file should sys.exit."""
3644
testargs = ['i_dont_exist.yaml']

0 commit comments

Comments
 (0)