# assert 5 == 3 where 5 = func()

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

## Root Cause

pytest's assertion rewriting failed to produce detailed introspection because the test module was imported before the plugin registered, or the module is a plugin/entry-point not collected by pytest.

## Version Compatibility

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

## Workarounds

1. **** (90% success)
   ```
   Rename `checks.py` to `test_checks.py` and run `pytest test_checks.py -v`. Ensure no `conftest.py` imports the module early.
   ```
2. **** (85% success)
   ```
   In `conftest.py`: `import pytest; pytest.register_assert_rewrite('myapp.tests.helpers')` then import helpers.
   ```

## Dead Ends

- **** — Manual messages still hide the intermediate values of subexpressions, defeating the purpose of assertion rewriting. (60% fail)
- **** — Disabling plugins also disables assertion rewriting from the built-in plugin, making output worse. (80% fail)
