Created
May 17, 2016 16:24
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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