# ValueError: duplicate 'test_id' in parametrize

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

## Root Cause

Two or more parametrized cases have the same ID, either explicitly set via ids 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', [1, 1], ids=['first', 'second'])
def test_foo(x): ...
   ```
2. **** (90% success)
   ```
   def idfn(val):
    return f'val-{val}-{uuid.uuid4()}'

@pytest.mark.parametrize('x', [1, 1], ids=idfn)
   ```

## Dead Ends

- **** — If the parameter values are identical, pytest still generates duplicate IDs. (70% fail)
- **** — The duplication is within the same test's parametrization, not across tests. (90% fail)
