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
They're unfortunately inaccurate because pytest (or a plugin or one of the dependencies) imports importlib_resources prior to starting up coverage, so any lines "executed" at coverage time get "missed". I did some more digging and found that pytest enabler unconditionally imports importlib_resources, probably because it takes advantage of features in importlib_resources 5.10, which didn't land in CPython until 3.12. There may be other plugins implicated too.
I've released a new pytest-enabler 3.1, which relies on the stdlib for importlib_resources in Python 3.12. Now when running the tests, they show a much more accurate picture of the coverage (on Python 3.12+). This issue still affects other dependencies used by pytest-enabler (jaraco.context, jaraco.functools). I've opened pytest-dev/pytest-cov#635 to track a more comprehensive solution, but I'm closing this for now.
“Collateral” tests fail with:
These are top-level statements (mostly
def
), and an alternate import for old Python versions.Originally posted by @encukou in #303 (comment)
The text was updated successfully, but these errors were encountered: