Could you try Python 3.4.x? I ran into some issues with Django's own test 
suite [0] due to some import changes in Python 3.5 [1].

[0] https://code.djangoproject.com/ticket/23763#comment:11
[1] http://bugs.python.org/issue7559

On Tuesday, April 26, 2016 at 6:04:56 PM UTC-4, Torsten Bronger wrote:
>
> Hallöchen! 
>
> With Django 1.9.5 (rest are original Ubuntu 16.04 packages) and 
> Python 3.5.1, "manage.py test myapp" tries to run the *models* 
> package of myapp as a test module: 
>
>     user@localhost:~/src/myproject/myproject$ ./manage.py test myapp 
> --pattern=invalid_pattern 
>     Creating test database for alias 'default'... 
>     Destroying old test database for alias 'default'... 
>     E 
>     ====================================================================== 
>     ERROR: myproject.myapp.models (unittest.loader._FailedTest) 
>     ---------------------------------------------------------------------- 
>     ImportError: Failed to import test module: myproject.myapp.models 
>     Traceback (most recent call last): 
>       File "/usr/lib/python3.5/unittest/loader.py", line 462, in 
> _find_test_path 
>         package = self._get_module_from_name(name) 
>       File "/usr/lib/python3.5/unittest/loader.py", line 369, in 
> _get_module_from_name 
>         __import__(name) 
>       File "/home/user/src/myproject/myproject/myapp/models/__init__.py", 
> line 26, in <module> 
>         from .physical_processes import * 
>       File 
> "/home/user/src/myproject/myproject/myapp/models/physical_processes.py", 
> line 66, in <module> 
>         class Substrate(PhysicalProcess): 
>       File 
> "/usr/local/lib/python3.5/dist-packages/django/db/models/base.py", line 
> 102, in __new__ 
>         "INSTALLED_APPS." % (module, name) 
>     RuntimeError: Model class 
> myproject.myapp.models.physical_processes.Substrate doesn't declare an 
> explicit app_label and isn't in an application in INSTALLED_APPS. 
>
>
>     ---------------------------------------------------------------------- 
>     Ran 1 test in 0.000s 
>
>     FAILED (errors=1) 
>     Destroying test database for alias 'default'... 
>
>
>
> I chose "invalid_pattern" to limit it to the models package. 
> Without "--pattern", all *real* tests are run, too.  Using Python2, 
> everything is fine.  Does anybody have an idea what's going on here? 
>
> Tschö, 
> Torsten. 
>
> -- 
> Torsten Bronger    Jabber ID: torsten...@jabber.rwth-aachen.de 
> <javascript:> 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a7b14bea-022c-4f9d-984d-2c63fdf60b8c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to