I ran into a very cryptic error in pytest, after adding a '@pytest.mark.parametrize' decorator the test started throwing the following error:
ValueError: <function ... at ...> uses no argument 'parameters'
I found the source of the error here
Here's what the signature of my function looks like (simplified):
@patch('dog')
@pytest.mark.parametrize('foo,bar', test_data)
def test_update_activity_details_trainer_and_gear(self, foo, bar, dog):
Turns out the order of decorators in pytest matters
@pytest.mark.parametrize('foo,bar', test_data)
@patch('dog')
def test_update_activity_details_trainer_and_gear(self, dog, foo, bar):
Changing the order removed the error
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With