How to add unit tests to a python 3 with the tests stored in a separate directory?

I would like to add unit tests to a python 3 project, and store them in a separate directory. The project tree is organized as follows

project/
├── project
│   ├── bar
│   │   ├── __init__.py
│   │   └── some_modules.py
│   └── foo
│       ├── __init__.py
│       └── some_other_modules.py
└── tests
    ├── test_bar.py
    └── test_foo.py

Does anyone know what's the best way to get these unit tests to work in this sort of project layout?

Posted Aug 29, 2016, 11:37 PM UTC

13
Loading comments…