# unittest.case._UnexpectedSuccess: test_something

- **ID:** `python/unittest-expected-failure-unexpected-success`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A test marked with `@unittest.expectedFailure` passed, meaning the known bug is fixed or the test no longer fails as expected.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   Remove `@unittest.expectedFailure` and run the test; it should pass.
   ```
2. **** (90% success)
   ```
   @unittest.skipIf(sys.version_info < (3, 10), 'requires 3.10')
def test_something(): ...
   ```

## Dead Ends

- **** — If the bug reappears, the test will fail and may be ignored. (50% fail)
- **** — Hides the fact that the bug is fixed; the test never runs. (70% fail)
