This is a starter template for creating new repositories/projects. Project structure is designed for pytest and pipenv.
Setup:
mkdir myproject; cd myproject
pipenv install
pipenv install pytest
- Write your tests and stuff
- To run your tests without all the problems of importing and stuff, run pytest as a module on its own with
pipenv shell python -m pytest tests
. Check Stefano's answer out for more details: https://stackoverflow.com/questions/10253826/path-issue-with-pytest-importerror-no-module-named-yadayadayada - To exit pipenv shell, type
exit
*If you are on pip 18.1 and are hitting an error message, check this out (saved my life!): https://stackoverflow.com/questions/52706769/pipenv-trouble-on-macos-typeerror-module-object-is-not-callable