# FAILED tests/test_math.py::TestMath::test_add - AssertionError: 1 != 2
SubTest failed: 
  test_add (test_math.TestMath.test_add) (i=1)
AssertionError: 1 != 2

- **ID:** `python/pytest-subtests-unittest-count`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

unittest's subTest failures are reported by pytest but not always counted as separate failures in JUnit XML or exit codes when using older pytest versions or the pytest-subtests plugin without proper config.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 7.4 | active | — | — |
| 8.x | active | — | — |

## Workarounds

1. **** (90% success)
   ```
   Install pytest-subtests:
  pip install pytest-subtests
Subtest failures then appear as separate test outcomes in reports.
   ```
2. **** (85% success)
   ```
   Upgrade pytest to >= 7.4 which improved subTest reporting and exit codes.
   ```

## Dead Ends

- **** — Changes test IDs and reporting; may break CI dashboards that key on names. (60% fail)
- **** — Reimplements subTest poorly; loses per-case reporting. (80% fail)
