# FAILED (failures=0)
# but subTest failures printed:
FAIL: test_batch (tests.test_batch.TestBatch.test_batch) (i=3)
AssertionError: 3 != 4

- **ID:** `python/unittest-subtest-failure-swallowed`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

subTest failures are recorded against the parent test but some runners or custom result classes do not increment the failures counter, so the summary reports failures=0 even though individual subtests failed.

## Version Compatibility

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

## Workarounds

1. **** (90% success)
   ```
   Run with a result class that counts subtests, or use pytest which reports them:

python -m pytest tests/test_batch.py -v
   ```
2. **** (85% success)
   ```
   Inspect result.failures + result.errors + subtest count in a custom runner:

result = unittest.TextTestRunner().run(suite)
assert not result.failures and not result.errors
   ```

## Dead Ends

- **** — Defeats the purpose of subTest (continue-on-failure) and stops at the first failing case. (85% fail)
- **** — The process may still exit 0 when failures counter is zero, so CI passes a broken suite. (90% fail)
