# AssertionError: 未找到预期调用。
预期: send_email('test@example.com')
实际: send_email('test@example.com', subject='Hello')

- **ID:** `python/pytest-mock-assert-called-with-any`
- **领域:** python
- **类别:** runtime_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

assert_called_with 要求参数完全匹配。如果实际调用包含额外的关键字参数，断言会失败。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 3.8 | active | — | — |
| 3.12 | active | — | — |

## 解决方案

1. **** (95% 成功率)
   ```
   from unittest.mock import ANY
mock.assert_called_with('test@example.com', subject=ANY)
   ```
2. **** (90% 成功率)
   ```
   mock.assert_called_with('test@example.com', subject='Hello')
   ```

## 无效尝试

- **** — This only checks the call count, not the arguments. (80% 失败率)
- **** — The extra arguments may be required for the function. (70% 失败率)
