-
Notifications
You must be signed in to change notification settings - Fork 213
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
reporting coverage for a module imported with importlib #677
Comments
If there would be a good way to do it we wouldn't have 99% of projects with
c extensions use a src-layout. Best to change the layout now, in the long
run you will have less hassle and issues.
…On Thu, Feb 13, 2025, 18:09 Martí Bosch ***@***.***> wrote:
Summary
I am using pytest with "importlib" as import mode
<https://github.com/martibosch/pylandstats/blob/main/pyproject.toml#L78>
because I am building a cython extension and otherwise pytest imports from
the folder named "pylandstats" (without the built cython extension) rather
than the installed package (also named "pylandstats", with the built cython
extension).
How can I get coverage to be reported within this setup? Of course an
alternative would be to move my module to src/pylandstats and not use the
importlib import mode, but can this be solved otherwise?
This may be related to nedbat/coveragepy#1002
<nedbat/coveragepy#1002>
Thank you!
—
Reply to this email directly, view it on GitHub
<#677>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA7TXP2OSY6CAWNGFZTRUT2PS7T5AVCNFSM6AAAAABXCR77B6VHI2DSMVQWIX3LMV43ASLTON2WKOZSHA2TCNBZGM4DCNY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
[image: martibosch]*martibosch* created an issue
(pytest-dev/pytest-cov#677)
<#677>
Summary
I am using pytest with "importlib" as import mode
<https://github.com/martibosch/pylandstats/blob/main/pyproject.toml#L78>
because I am building a cython extension and otherwise pytest imports from
the folder named "pylandstats" (without the built cython extension) rather
than the installed package (also named "pylandstats", with the built cython
extension).
How can I get coverage to be reported within this setup? Of course an
alternative would be to move my module to src/pylandstats and not use the
importlib import mode, but can this be solved otherwise?
This may be related to nedbat/coveragepy#1002
<nedbat/coveragepy#1002>
Thank you!
—
Reply to this email directly, view it on GitHub
<#677>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA7TXP2OSY6CAWNGFZTRUT2PS7T5AVCNFSM6AAAAABXCR77B6VHI2DSMVQWIX3LMV43ASLTON2WKOZSHA2TCNBZGM4DCNY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
I am using pytest with "importlib" as import mode because I am building a cython extension and otherwise pytest imports from the folder named "pylandstats" (without the built cython extension) rather than the installed package (also named "pylandstats", with the built cython extension).
How can I get coverage to be reported within this setup? Of course an alternative would be to move my module to
src/pylandstats
and not use the importlib import mode, but can this be solved otherwise?This may be related to nedbat/coveragepy#1002
Thank you!
The text was updated successfully, but these errors were encountered: