-
-
Notifications
You must be signed in to change notification settings - Fork 136
Update pytest to latest version #330
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #330 +/- ##
=======================================
Coverage 70.95% 70.95%
=======================================
Files 80 80
Lines 2355 2355
=======================================
Hits 1671 1671
Misses 684 684 Continue to review full report at Codecov.
|
Hi @ashb thanks for the PR. I have few questions:
How not tacky way would look like?
I'm curious, why you need to run these tests?
Do you mean "Tests outside application code" section or can you point me to exact paragraph? Thanks in advance. |
@p1c2u I haven't run in to this issue before with other pytest projects, so I'm not sure why I've hit it here (perhaps I have always just run with So there are two non-hacky ways we could do this. (I define hacky as having to tweak
I don't have a strong preference either way. Do you? |
Another way to do this is to use pytest-pythonpath and set [tool:pytest]
pythonpath = . in But always installing the package is still the better idea. I think a lot of project these days don't have that issue since they tend to use nox or tox to run tests instead (they automatically reinstall the package into the test environment before invoking the test suite). |
Thanks guys, Python 2 support was dropped. Nothing stopping us now to update to pytest 6.
If so then we should go with the recommended way. |
👍 I'll update this to use the recommended way. |
@p1c2u Updated this PR. I've left it with the same source layout, but added |
Updated pytest with new poetry build system |
The
tests/conftest.py
is a bit of a hack, but needed to support running tests against a non-editable install (which is the recommended way as per https://docs.pytest.org/en/latest/explanation/goodpractices.html?highlight=tests%20outside#choosing-a-test-layout-import-rules )Closes #159