# AssertionError: assert {'a': 1, 'b': 2, ...} == {'a': 1, 'b': 3, ...}
  省略了 15 个相同项，使用 -vv 显示
  不同项:
  {'b': 2} != {'b': 3}

- **ID:** `python/pytest-assertion-dict-diff-truncated`
- **领域:** python
- **类别:** data_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

pytest 默认截断大型字典/列表差异；实际分歧隐藏在省略项中，使 CI 日志中的失败难以诊断。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 7.x | active | — | — |
| 8.x | active | — | — |

## 解决方案

1. **** (90% 成功率)
   ```
   Raise verbosity:
pytest -vv tests/test_config.py::test_merge
# or set in config
# [tool.pytest.ini_options]
# addopts = "-vv"
   ```
2. **** (85% 成功率)
   ```
   Or compute a minimal diff explicitly:
from deepdiff import DeepDiff
diff = DeepDiff(expected, actual, ignore_order=True)
assert not diff, diff
   ```

## 无效尝试

- **** — Output is captured and interleaved unpredictably; hard to diff visually in CI. (65% 失败率)
- **** — Works but noisy and slow; you lose pytest's structured diff. (50% 失败率)
