-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
missleading error on getfuncargvalue for parameterized fixture #460
Comments
Original comment by Matthias Geier (BitBucket: geier, GitHub: geier): 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. |
Original comment by Matthias Geier (BitBucket: geier, GitHub: geier): Here's my code example (without classes) that shows the same error:
Is there a way to make this work? |
Original comment by Fayaz Khan (BitBucket: fayaz, GitHub: fayaz): In my case, the fixture seems to be failing because it shares name with a parameter on the test.
Try changing the name |
@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: |
that kind of usage should raise an error |
this is a rather bad case, |
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 |
its a completely different dimension than subtests ^^ subtests happen by design within a test this case is requesting something that should have been parametrized before the test within the test and without parameters |
Fair enough. But we're agreed on needing a better error message? |
correct |
Fixed by #1620 Please close. (I'll do the magic commit message that closes issues next time) |
thanks |
Originally reported by: Nikolaus Rath (BitBucket: nikratio, GitHub: nikratio)
The attached meta-test-case results in
with pytest from Mercurial tip.
The text was updated successfully, but these errors were encountered: