# Ran 0 tests in 0.000s

- **ID:** `python/unittest-discovery-no-tests-ran`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

unittest discover found no test modules because the pattern didn't match, the start directory wasn't a package (missing __init__.py in older versions), or filenames don't match test*.py.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.10 | active | — | — |
| 3.12 | active | — | — |

## Workarounds

1. **** (92% success)
   ```
   python -m unittest discover -s tests -p 'test_*.py' -v
# Ensure tests/ has __init__.py if using package-relative imports
   ```
2. **** (88% success)
   ```
   git mv tests/foo_tests.py tests/test_foo.py
python -m unittest discover -v
   ```

## Dead Ends

- **** — The methods are never executed because discovery fails before collection; prints never run. (85% fail)
- **** — Default pattern is 'test*.py' (prefix). 'mytest.py' won't match; only 'test_*.py' or 'test*.py' work. (60% fail)
