Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider src directory #2

Open
ericfrederich opened this issue Jan 17, 2020 · 1 comment
Open

Consider src directory #2

ericfrederich opened this issue Jan 17, 2020 · 1 comment

Comments

@ericfrederich
Copy link

Consider using a src directory. This facilitates running tests against what is actually installed.

https://hynek.me/articles/testing-packaging/

I have been bitten by this. I've had tests pass locally but fail within a .whl file. I've had them pass in a .whl file and fail in a source tgz file. This typically happens when you start needing to ship non-python files. Configuration, images, documents, templates, etc.

@MartinHeinz
Copy link
Owner

Thanks for the suggestion.

This project setup is assuming that you are building, running, testing... your app using Docker containers. If that's the case then you should not run into issues you described. There's also tests/context.py file that allows you to tweak context of your tests, if you have any issues.

I've been using this layout for a while and I haven't run into any problems with test runs, so I'm inclined to keep it the simple way (as it is now).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants