Python relative paths for unit tests
问题 Given the directory structure: /home/user/python/mypacakge/src/foo.py /home/user/python/mypacakge/tests /home/user/python/mypacakge/tests/fixtures /home/user/python/mypacakge/tests/fixtures/config.json.sample /home/user/python/mypacakge/tests/foo_tests.py /home/user/python/mypacakge/README.md Where src contains the source code, and test contains the unit tests, how do I setup a "package" so that my relative imports that are used in the unit tests located in test/ can load classes in src/ ?