Find file
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (29 sloc) 1.25 KB
Test support harness for doing test.
import sys
# Bootstrap Django's settings.
from django.conf import settings
'default': {'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory;'}
INSTALLED_APPS = ['django_storymarket', 'django.contrib.contenttypes', 'django.contrib.auth'],
TEST_RUNNER = "django_nose.NoseTestSuiteRunner",
def runtests():
"""Test runner for test."""
# Run you some tests.
import django.test.utils
runner_class = django.test.utils.get_runner(settings)
test_runner = runner_class(verbosity=1, interactive=True)
failures = test_runner.run_tests(['django_storymarket'])
# Okay, so this is a nasty hack. If this isn't here, ` test` craps out
# when generating a coverage report via Nose. I have no idea why, or what's
# supposed to be going on here, but this seems to fix the problem, and I
# *really* want coverage, so, unless someone can tell me *why* I shouldn't
# do this, I'm going to just whistle innocently and keep on doing this.
sys.exitfunc = lambda: 0