# ValueError: duplicate 'test_id' in parametrize

- **ID:** `python/pytest-parametrize-id-conflict`
- **Domain:** python
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Two or more parametrized test cases have the same ID, either explicitly set via the ids argument or generated automatically from identical parameter values.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   @pytest.mark.parametrize('x,y', [(1,2), (1,2)], ids=['case1', 'case2'])
def test_add(x, y):
    assert x + y == 3
   ```
2. **** (90% success)
   ```
   @pytest.mark.parametrize('x,y,case', [(1,2,'a'), (1,2,'b')])
def test_add(x, y, case):
    assert x + y == 3
   ```

## Dead Ends

- **** — pytest will still generate duplicate IDs if the parameter values are identical, causing the same error. (75% fail)
- **** — The conflict is in the parametrize IDs, not the test function name. Renaming the function does not resolve the duplicate ID. (90% fail)
