question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cython coverage tool blames that function definition lines are not covered

See original GitHub issue

I’m trying to enable a coverage for cython modules for multidict library. Cython.Coverage plugin works but the coverage output looks incorrect.

The tool blames that method definitions are not executed lines but it’s definitely wrong because method bodies are executed and test covered.

What I do wrong?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:8
  • Comments:22 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
scodercommented, Mar 1, 2019

Thanks for investigating @anthrotype. I’ve created a PR for adding the necessary line trace.

1reaction
scodercommented, May 27, 2018

The binding directive is generally a good idea, mainly because it improves the Python compatibility of Cython compiled functions. However, I would not recommend using it only for testing, since disabling it for production changes the behaviour there.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Coverage of Cython module using py.test and coverage.py
The current answer here has two parts: pytest configuration; coverage.py configuration. Let's start with the pytest configuration.
Read more >
Cython coverage help - Google Groups
I've made a basic cython repo with one function to understand how to use coverage and report it. ... Yet I see no...
Read more >
Contributing — scikit-learn 1.2.0 documentation
Do the tests cover every line of code (see the coverage report in the build log)? If not, are the lines missing coverage...
Read more >
Transcripts Episode #178 Coverage.py - Talk Python
If you're not using code coverage, chances are you're guessing. ... I don't know what it means, I paste it in, it seems...
Read more >
CHANGES.rst · 0.23 · zont-public / Cython · GitLab - Microline Git
Annotated HTML source pages can integrate (XML) coverage reports. Tracing is supported in nogil functions/sections and module init code. When generators are ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found