# AssertionError: False is not true : expected True

- **ID:** `python/unittest-assertion-rewrite-missing`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

In unittest, `self.assertTrue(x)` on a falsy value produces a generic message; pytest's assertion rewriting does not apply to unittest.TestCase methods, so diffs are opaque.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   def test_something():
    result = compute()
    assert result == expected  # pytest shows rich diff
   ```
2. **** (85% success)
   ```
   self.assertEqual(result, expected)
self.assertIn(item, container)
self.assertIsNotNone(obj)
   ```

## Dead Ends

- **** — Disables assertion rewriting entirely, making messages even less informative. (90% fail)
- **** — Adds noise to test output and does not fix the underlying opaque failure; CI logs become harder to scan. (60% fail)
- **** — Global monkeypatch affects all tests and is fragile across unittest versions. (80% fail)
