# ValueError: 2 parameters passed to 'test_add' but expected 1

- **ID:** `python/pytest-parametrize-arg-count-mismatch`
- **Domain:** python
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The @pytest.mark.parametrize decorator provides a number of arguments that does not match the test function's parameter list, causing a ValueError.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   Ensure the number of arguments in the parametrize decorator matches the test function's parameters. For example, if the test expects (a, b), use @pytest.mark.parametrize('a,b', [(1,2)])
   ```
2. **** (80% success)
   ```
   Use a single argument with a tuple or list if the test function accepts one parameter that contains multiple values.
   ```

## Dead Ends

- **** — Adding extra parameters to the test function without updating the parametrize decorator may fix the count but could break other tests. (50% fail)
- **** — Removing arguments from the decorator without adjusting the test function leads to missing required parameters. (70% fail)
