Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
missleading error on getfuncargvalue for parameterized fixture #460
The attached meta-test-case results in
with pytest from Mercurial tip.
I get the same error when trying to create a fixture that concatenates two or more other fixtures (see my question on stackoverflow).
It's possible to have a fixture using a fixture using a fixture and so on, but it doesn't seem to be possible if parametrized fixtures are involved.
Here's my code example (without classes) that shows the same error:
Is there a way to make this work?
In my case, the fixture seems to be failing because it shares name with a parameter on the test.
Try changing the name
referenced this issue
Jun 15, 2015
@RonnyPfannschmidt any reason this is listed as backward compatibility? Is request.getfuncargvalue deprecated? I'm hitting this issue with an on/off settings flipper fixture being used by a fixture that uses request.getfuncargvalue.
A minimal test case, equivalent of the one above:
Result is same as above:
changed the title from
AttributeError: 'SubRequest' object has no attribute 'param'
missleading error on getfuncargvalue for parameterized fixture
May 19, 2016
Yeah I can see that using getfuncargvalue in a fixture can't start multiplying the cases, like params do. In fact it seems as difficult as supporting unittest subtests (#1367).
I think a better error than