From 2f1168b6d49156736ca7305117491d64972ce82a Mon Sep 17 00:00:00 2001 From: Jeremy Epstein Date: Thu, 25 Aug 2016 22:09:56 +1000 Subject: [PATCH] make test command exit with correct status --- {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/cli.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/cli.py b/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/cli.py index 8294cf5..2b0629d 100644 --- a/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/cli.py +++ b/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/cli.py @@ -18,7 +18,9 @@ TEST_PATH = os.path.join(PROJECT_ROOT, 'tests') def test(): """Run the tests.""" import pytest - pytest.main([TEST_PATH, '--verbose']) + rv = pytest.main([TEST_PATH, '--verbose']) + if rv is not 0: + exit(rv) @click.command()