# AssertionError: assert (1, 2) == (1, 3)

- **ID:** `python/pytest-assertion-with-tuple`
- **Domain:** python
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

在pytest中，直接比较元组时，如果元素不相等，pytest会显示详细差异，但根本原因是测试逻辑错误或数据未更新。

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.9 | active | — | — |

## Workarounds

1. **** (90% success)
   ```
   assert actual_tuple == expected_tuple  # 确保expected_tuple正确
   ```
2. **** (85% success)
   ```
   assert (1.0, 2.0) == pytest.approx((1.0, 2.0001))
   ```

## Dead Ends

- **** — 无法比较整个元组的逻辑，且可能忽略其他元素。 (60% fail)
- **** — 测试失去意义，无法捕获错误。 (100% fail)
