When I run a command on py3:
python manage.py test myproject.user_management --settings mysettings.py
I see all my tests working fine:
Ran 29 tests
But the same command on py2:
Ran 0 tests
Command on py2 is only working when I add tests folder to command, like:
python manage.py test myproject.user_management.test --settings mysettings.py
I already: 1. Double check my imports an __init__.py in all folders and sub folders 2. Settings etc.
My app structure looks like:
project_name
----user_management
--------__init__.py
--------tests
------------__init__.py
------------training
----------------__init__.py
----------------training.py
In python manage.py shell I can easy do:
from axis.user_management.tests import TrainingViewSetTest
This behaviour happens only for few apps in my project.
Aucun commentaire:
Enregistrer un commentaire