# AssertionError: assert False
 +  where False = <built-in method __eq__ of type object at 0x...>(1, 2)
# note: assertion rewriting is disabled; enable with --assert=rewrite

- **ID:** `python/pytest-assertion-introspection-disabled`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

pytest's assertion rewriting is disabled, either because --assert=plain was passed, the test module was imported via importlib without pytest's meta path finder, or PYTEST_DISABLE_PLUGIN_AUTOLOAD interfered.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   # pytest.ini
[pytest]
addopts = --assert=rewrite
# verify with: pytest --version -v | grep assertion
   ```
2. **** (85% success)
   ```
   # Instead of: import tests.test_foo
# Run: pytest tests/test_foo.py
# and remove any `importlib.import_module('tests.test_foo')` from conftest.py
   ```

## Dead Ends

- **** — Verbosity increases output but does not re-enable assertion rewriting; the useful diff remains missing. (90% fail)
- **** — Manual prints work but clutter tests and don't restore pytest's rich introspection for all assertions. (65% fail)
