You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 13, 2024. It is now read-only.
As a result of my recent issues transferring a C Extension project to something skeleton-like and @DominicOram's issues around coverage, I ended up looking into how pytest works for non-editable installs; In short form, it doesn't.
To see this yourself, load up the dev container and run the following:
/venv/lib/python3.11/site-packages/coverage/report.py:87: CoverageWarning: Couldn't parse '/scratch/enu43627/projects/python3-pip-skeleton/src/python3_pip_skeleton/__init__.py': No source for code: '/scratch/enu43627/projects/python3-pip-skeleton/src/python3_pip_skeleton/__init__.py'. (couldnt-parse)
coverage._warn(msg, slug="couldnt-parse")
This is because pytest uses it's own import machinery which is reading the files from the src directory regardless of the install being "editable", resulting in very fragile behaviour which is not representative of shipped package