From a8c1c5754f9130f3c06a9e32a00ce061cce61f82 Mon Sep 17 00:00:00 2001 From: sloria Date: Sun, 27 Jul 2014 15:07:10 -0400 Subject: [PATCH] Use pytest.main instead of shelling out --- {{cookiecutter.app_name}}/manage.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.app_name}}/manage.py b/{{cookiecutter.app_name}}/manage.py index 45f0038..1ce37b7 100644 --- a/{{cookiecutter.app_name}}/manage.py +++ b/{{cookiecutter.app_name}}/manage.py @@ -28,8 +28,9 @@ def _make_context(): @manager.command def test(): """Run the tests.""" - status = subprocess.call(TEST_CMD, shell=True) - sys.exit(status) + import pytest + exit_code = pytest.main(['tests', '--verbose']) + return exit_code manager.add_command('server', Server()) manager.add_command('shell', Shell(make_context=_make_context))