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:
Chris Hill-Scott
2018-02-14 11:50:51 +00:00
parent 0f20cfe8bc
commit 9f275d2a0b

View File

@@ -35,5 +35,5 @@ npm test
display_result $? 2 "Front end code style check"
## Code coverage
py.test -n4 --cov=app --cov-report=term-missing tests/ --junitxml=test_results.xml --strict
py.test -n4 -x --cov=app --cov-report=term-missing tests/ --junitxml=test_results.xml --strict
display_result $? 3 "Code coverage"