Commit 8a736d95 by Henrique Carvalho Alves Committed by Florian Apolloner

Fixed test runner for Django 1.4

parent c9c65c35
......@@ -32,6 +32,5 @@ setup(
'Programming Language :: Python',
'Framework :: Django',
],
test_suite='taggit.tests.runtests.runtests'
test_suite='taggit.tests.runtests.runtests',
)
......@@ -6,7 +6,11 @@ from django.conf import settings
if not settings.configured:
settings.configure(
DATABASE_ENGINE='sqlite3',
DATABASES={
'default': {
'ENGINE': 'django.db.backends.sqlite3',
}
},
INSTALLED_APPS=[
'django.contrib.contenttypes',
'taggit',
......@@ -14,21 +18,13 @@ if not settings.configured:
]
)
from django.test.simple import run_tests
from django.test.simple import DjangoTestSuiteRunner
def runtests(*test_args):
if not test_args:
test_args = ['tests']
parent = os.path.join(
os.path.dirname(os.path.abspath(__file__)),
"..",
"..",
)
sys.path.insert(0, parent)
failures = run_tests(test_args, verbosity=1, interactive=True)
def runtests():
runner = DjangoTestSuiteRunner()
failures = runner.run_tests(['tests'], verbosity=1, interactive=True)
sys.exit(failures)
if __name__ == '__main__':
runtests(*sys.argv[1:])
runtests()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment