Use pytest.main instead of shelling out

master
sloria 10 years ago
parent e14468e8fa
commit a8c1c5754f
  1. 5
      {{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))

Loading…
Cancel
Save