Created
January 29, 2013 20:51
-
-
Save mstepniowski/4667736 to your computer and use it in GitHub Desktop.
Run tests of a standalone Django package.
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
import sys | |
from django.conf import settings | |
settings.configure( | |
DEBUG=True, | |
DATABASES={'default': {'ENGINE': 'django.db.backends.sqlite3'}, | |
'secondary': {'ENGINE': 'django.db.backends.sqlite3'}}, | |
INSTALLED_APPS=['django.contrib.auth', | |
'django.contrib.contenttypes', | |
'sjcommon']) | |
from django.test.simple import DjangoTestSuiteRunner | |
test_runner = DjangoTestSuiteRunner(verbosity=1) | |
failures = test_runner.run_tests(['sjcommon']) | |
if failures: | |
sys.exit(failures) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment