Commit 2c68df1a by Florian Apolloner

Moved tests to the toplevel.

parent 08579a12
...@@ -3,6 +3,8 @@ import os ...@@ -3,6 +3,8 @@ import os
import sys import sys
from django.conf import settings from django.conf import settings
from django.core.management import execute_from_command_line
if not settings.configured: if not settings.configured:
settings.configure( settings.configure(
...@@ -14,18 +16,16 @@ if not settings.configured: ...@@ -14,18 +16,16 @@ if not settings.configured:
INSTALLED_APPS=[ INSTALLED_APPS=[
'django.contrib.contenttypes', 'django.contrib.contenttypes',
'taggit', 'taggit',
'taggit.tests', 'tests',
] ]
) )
from django.test.simple import DjangoTestSuiteRunner
def runtests(): def runtests():
runner = DjangoTestSuiteRunner() argv = sys.argv[:1] + ['test'] + sys.argv[1:]
failures = runner.run_tests(['tests'], verbosity=1, interactive=True) execute_from_command_line(argv)
sys.exit(failures)
if __name__ == '__main__': if __name__ == '__main__':
runtests(*sys.argv[1:]) runtests()
from __future__ import unicode_literals from __future__ import unicode_literals, absolute_import
from django import forms from django import forms
from taggit.tests.models import Food, DirectFood, CustomPKFood, OfficialFood from .models import Food, DirectFood, CustomPKFood, OfficialFood
class FoodForm(forms.ModelForm): class FoodForm(forms.ModelForm):
......
from __future__ import unicode_literals from __future__ import unicode_literals, absolute_import
from unittest import TestCase as UnitTestCase from unittest import TestCase as UnitTestCase
...@@ -12,9 +12,9 @@ from django.utils.encoding import force_text ...@@ -12,9 +12,9 @@ from django.utils.encoding import force_text
from taggit.managers import TaggableManager from taggit.managers import TaggableManager
from taggit.models import Tag, TaggedItem from taggit.models import Tag, TaggedItem
from taggit.tests.forms import (FoodForm, DirectFoodForm, CustomPKFoodForm, from .forms import (FoodForm, DirectFoodForm, CustomPKFoodForm,
OfficialFoodForm) OfficialFoodForm)
from taggit.tests.models import (Food, Pet, HousePet, DirectFood, DirectPet, from .models import (Food, Pet, HousePet, DirectFood, DirectPet,
DirectHousePet, TaggedPet, CustomPKFood, CustomPKPet, CustomPKHousePet, DirectHousePet, TaggedPet, CustomPKFood, CustomPKPet, CustomPKHousePet,
TaggedCustomPKPet, OfficialFood, OfficialPet, OfficialHousePet, TaggedCustomPKPet, OfficialFood, OfficialPet, OfficialHousePet,
OfficialThroughModel, OfficialTag, Photo, Movie, Article) OfficialThroughModel, OfficialTag, Photo, Movie, Article)
......
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