# ValueError: duplicate parameter set with id 'case_1'

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

## Root Cause

Using the same ID for multiple parametrized cases without unique IDs.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **** (99% success)
   ```
   @pytest.mark.parametrize('arg', [1, 2], ids=['case_1', 'case_2'])
   ```
2. **** (95% success)
   ```
   def id_func(val):
    return f'case_{val}'
@pytest.mark.parametrize('arg', [1, 2], ids=id_func)
   ```

## Dead Ends

- **** — Pytest will auto-generate IDs, but they may not be descriptive. (40% fail)
- **** — This still causes duplicate IDs. (100% fail)
