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

PyTest Coverage Warning When Importing OpenCV #1041

Open
3 of 4 tasks
MattTheCuber opened this issue Nov 1, 2024 · 0 comments
Open
3 of 4 tasks

PyTest Coverage Warning When Importing OpenCV #1041

MattTheCuber opened this issue Nov 1, 2024 · 0 comments

Comments

@MattTheCuber
Copy link

This issue is a continuation of this issue from coveragepy as the issue was closed because a workaround was found. This workaround still works, but the root problem still exists so I wanted to document it on this repo.

Expected behaviour

I would expect there to be no warnings.

Actual behaviour

The following warnings are thrown:

CoverageWarning: Couldn't parse '/home/mvine/Documents/test_coverage/config-3.py': No source for code: '/home/mvine/Documents/test_coverage/config-3.py'. (couldnt-parse)
Couldn't parse '/home/mvine/Documents/test_coverage/config.py': No source for code: '/home/mvine/Documents/test_coverage/config.py'. (couldnt-parse)

Steps to reproduce

This comment on this issue precisely demonstrates the steps to reproduce: nedbat/coveragepy#1653 (comment)

Although there are several different ways to achieve this bug (such as running pytest --cov).

Issue submission checklist
  • This is not a generic OpenCV usage question (looking for help for coding, other usage questions, homework etc.)
  • I have read the README of this repository and understand that this repository provides only an automated build toolchain for OpenCV Python packages (there is no actual OpenCV code here)
  • The issue is related to the build scripts in this repository, to the pre-built binaries or is a feature request (such as "please enable this additional dependency")
  • I'm using the latest version of opencv-python - opencv-python==4.10.0.84
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

1 participant