I can see the problem as well, and I can see it in 2.0 and 1.11 too. Please 
open a new bug on the testing framework.

On Monday 09 October 2017 06:50:15 Shun Yu wrote:
> When I try to run the whole test suite it works fine, it's just that when I
> try to run this specific one it's failing on me.
> 
> On Sunday, October 8, 2017 at 1:35:33 PM UTC-7, Shun Yu wrote:
> > I'm trying to run the "migrations.test_autodetector.AutodetectorTests"
> > for django, but I can't seem to get it to work.
> > I'm using Windows 10 and Python 3.6.2.
> > Below is the output I'm getting, thanks for the help!
> > 
> > C:\Users\Shun\.virtualenvs\django-original-test\Scripts\python.exe
> > C:/Users/Shun/Desktop/django/django/tests/runtests.py
> > --settings=test_sqlite
> > tests.migrations.test_autodetector.AutodetectorTests Testing against
> > Django installed in
> > 'c:\users\shun\desktop\django\django\django'
> > 
> > Traceback (most recent call last):
> >   File "C:/Users/Shun/Desktop/django/django/tests/runtests.py", line 478,
> > 
> > in <module>
> > 
> >     options.exclude_tags,
> >   
> >   File "C:/Users/Shun/Desktop/django/django/tests/runtests.py", line 282,
> > 
> > in django_tests
> > 
> >     extra_tests=extra_tests,
> >   
> >   File "c:\users\shun\desktop\django\django\django\test\runner.py", line
> > 
> > 598, in run_tests
> > 
> >     suite = self.build_suite(test_labels, extra_tests)
> >   
> >   File "c:\users\shun\desktop\django\django\django\test\runner.py", line
> > 
> > 484, in build_suite
> > 
> >     tests = self.test_loader.loadTestsFromName(label)
> >   
> >   File
> > 
> > "c:\users\shun\appdata\local\programs\python\python36\Lib\unittest\loader
> > .py", line 153, in loadTestsFromName
> > 
> >     module = __import__(module_name)
> >   
> >   File
> > 
> > "c:\users\shun\desktop\django\django\tests\migrations\test_autodetector.p
> > y", line 18, in <module>
> > 
> >     from .models import FoodManager, FoodQuerySet
> >   
> >   File "c:\users\shun\desktop\django\django\tests\migrations\models.py",
> > 
> > line 9, in <module>
> > 
> >     class ModelWithCustomBase(models.Model, metaclass=CustomModelBase):
> >   File "c:\users\shun\desktop\django\django\django\db\models\base.py",
> > 
> > line 108, in __new__
> > 
> >     "INSTALLED_APPS." % (module, name)
> > 
> > RuntimeError: Model class tests.migrations.models.ModelWithCustomBase
> > doesn't declare an explicit app_label and isn't in an application in
> > INSTALLED_APPS.
> > 
> > Process finished with exit code 1

Reply via email to