Comments (2)
Original comment by Batiste Bieler (Bitbucket: batiste, GitHub: batiste)
I actually found that django-haystack was responsible for the coverage issue.
Django-haystack seems to load itself very early, and every module imported in search_indexes.py will have the problem described belove.
from coveragepy.
This is one of the FAQs (http://nedbatchelder.com/code/coverage/faq.html). You need to start coverage earlier. There are Django-specific test runners that understand coverage (here's a recent post: http://chris.improbable.org/2010/01/28/django-site-test-coverage/). You can also simply take your python command that runs your tests, and run it under coverage instead:
coverage.py run django-test-runner-however-you-do-it.py arg1 arg2 ...
from coveragepy.
Related Issues (20)
- 100% covered when much is uncovered HOT 3
- Report integration with Sphinx HOT 6
- Different result between using coverage API and command line HOT 1
- JSON coverage files should contain a format version HOT 5
- Intermittent failure in the CI due to set size changed while iterating HOT 5
- coverage report might raise FileNotFoundError when test patches glob HOT 3
- Can we add a json schema to complete pyproject.toml's [tool.coverage]?
- Test suite gets stuck when running on Windows PyPy 7.3.15 HOT 10
- test suite gets really slow in pypy3.9-v7.3.15 on ubuntu 22.04.3 HOT 4
- notes on our experience upgrading coverage 5.4 -> 7.4 HOT 1
- Question: Can `no-cover` "cover" the rest of the function? HOT 2
- Question: How to get the coverage data for each incoming request on my web server. HOT 2
- "No data was collected" when passing --source containing new line separated list HOT 5
- Question: how to add a middleware located on a different folder in settings.py ? HOT 1
- How to exclude external packages from coverage report when using coverage.py API ? HOT 1
- Use PEP 669 Low Impact Monitoring to reduce overhead HOT 3
- How to automate a coverage report using .coveragerc file HOT 1
- How to only show functions that hasn't been covered? HOT 1
- Relative paths duplicates paths on Windows HOT 9
- Facing issue No source for code while combining multiple coverage files HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coveragepy.