# AssertionError: 0 != 1 : SubTest failed

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

## Root Cause

A subTest failure is not being properly reported because the subTest block doesn't raise an assertion error correctly.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   for i in range(5):
    with self.subTest(i=i):
        self.assertEqual(i, 0)
   ```
2. **** (90% success)
   ```
   @pytest.mark.parametrize('i', range(5))
def test_foo(i):
    assert i == 0
   ```

## Dead Ends

- **** — This loses granularity of test reporting. (70% fail)
- **** — This may swallow the exception and not mark the test as failed. (80% fail)
