# Failed example:
    print({'a': 1, 'b': 2})
Expected:
    {'a': 1, 'b': 2}
Got:
    {'b': 2, 'a': 1}

- **ID:** `python/pytest-doctest-output-mismatch`
- **Domain:** python
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Doctests compare exact string output. Dict ordering in Python 3.7+ is insertion order, so the expected output must match the actual insertion order, or use sorted output.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   >>> print(dict(sorted({'b': 2, 'a': 1}.items())))
{'a': 1, 'b': 2}
   ```
2. **** (80% success)
   ```
   >>> print({'a': 1, 'b': 2})  # doctest: +ELLIPSIS
{...}
   ```

## Dead Ends

- **** — Skips the test entirely, losing coverage for the function's behavior. (85% fail)
- **** — Hash seed affects set ordering, not dict insertion order in modern Python; dicts preserve insertion order regardless. (90% fail)
