Skip to content

Instantly share code, notes, and snippets.

@alorence
Created May 17, 2016 16:24
Show Gist options
  • Save alorence/f4eb2cbbfce8d1cba93f4a20649ac483 to your computer and use it in GitHub Desktop.
Save alorence/f4eb2cbbfce8d1cba93f4a20649ac483 to your computer and use it in GitHub Desktop.
Default django test module to use when pytest is the preferred test framework
# If your Django project uses pytest instead of the default django test framework, simply put this file in an application.
# It will be run when 'python manage.py test' is run and inform user that the project must be tested using pytest.
from django.test import TestCase
class UsePyTest(TestCase):
def test_use_pytest(self):
self.fail(
''
'******************************************************************\n'
'This project uses py.test instead of default Django test frameworks. Please do not\n'
'use "manage.py test", instead, install "pytest-django" via pip and run "py.test"\n'
'**********************************************************************************\n'
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment