mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-15 09:42:38 -05:00
Stop pytest on first failing test
If a PR is going to fail because tests aren’t passing then you: - should know about it as quick as possible - shouldn’t waste precious Jenkins CPU running subsequent tests This commit adds the `-x` flag to pytest, which stops the test run as soon as one failing test is discovered.
This commit is contained in:
@@ -31,5 +31,5 @@ flake8 .
|
||||
display_result $? 1 "Code style check"
|
||||
|
||||
# run with four concurrent threads
|
||||
py.test --cov=app --cov-report=term-missing tests/ --junitxml=test_results.xml -n 4 -v
|
||||
py.test --cov=app --cov-report=term-missing tests/ --junitxml=test_results.xml -n4 -v -x
|
||||
display_result $? 2 "Unit tests"
|
||||
|
||||
Reference in New Issue
Block a user