# Coverage.py warning: No data was collected. (no-data-collected)

- **ID:** `python/pytest-cov-no-data-collected`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

pytest-cov did not collect coverage because the source paths are not specified or the tests did not import the target modules.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 4.1 | active | — | — |

## Workarounds

1. **** (98% success)
   ```
   Run: pytest --cov=myapp tests/
Or in pytest.ini:
[pytest]
addopts = --cov=myapp
   ```
2. **** (90% success)
   ```
   Check that test files import the modules under test. Coverage only measures executed code.
   ```

## Dead Ends

- **** — Without a path, coverage may not know which files to measure. (70% fail)
- **** — This disables coverage reporting entirely. (90% fail)
