Skip to content

Commit ed48620

Browse files
committed
sys exit status codes for travis.
1 parent 7fe1cf7 commit ed48620

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

{{cookiecutter.app_slug}}/manage.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from project.server import create_app, db
1111
from project.server.models import User
1212
import subprocess
13+
import sys
1314

1415
app = create_app()
1516
cli = FlaskGroup(create_app=create_app)
@@ -64,8 +65,9 @@ def test():
6465
tests = unittest.TestLoader().discover('project/tests', pattern='test*.py')
6566
result = unittest.TextTestRunner(verbosity=2).run(tests)
6667
if result.wasSuccessful():
67-
return 0
68-
return 1
68+
sys.exit(0)
69+
else:
70+
sys.exit(1)
6971

7072

7173
@cli.command()
@@ -80,8 +82,9 @@ def cov():
8082
COV.report()
8183
COV.html_report()
8284
COV.erase()
83-
return 0
84-
return 1
85+
sys.exit(0)
86+
else:
87+
sys.exit(1)
8588

8689

8790
@cli.command()

0 commit comments

Comments
 (0)