How do I tell django-nose where my tests are?

后端 未结 5 1632
小鲜肉
小鲜肉 2021-02-02 15:38

I have my tests for a Django application in a tests directory:

my_project/apps/my_app/
├── __init__.py
├── tests
│   ├── __init__.py
│   ├── field_tests.py
│   └         


        
5条回答
  •  盖世英雄少女心
    2021-02-02 16:05

    Wrong:

    python manage.py test my_app.tests.storage_tests:TestCase.test_name
    

    is in fact with slashes until the class name and with the extension of the file

    Right:

    python manage.py test my_app/tests/storage_tests.py:TestCase.test_name
    

提交回复
热议问题