Question: Can someone explain the below uses of @pytest.mark.usefixtures #3308
Comments
GitMate.io thinks possibly related issues are #378 (@pytest.mark.usefixtures take no effects on fixtures), #121 (make pytest.mark available outside pytest), #2401 (pytest.mark not evaluated with pytest_generate_tests), #1111 (pytest.mark.parametrize fails with lambdas), and #666 (pytest.mark.skipif on class method uses "reason" from class level pytestmark). |
usefixtures uses the fixture names as strings |
@RonnyPfannschmidt I see the usage of 1 in pytest doc.
|
@thakkardharmik thanks for pointing that out, that seems like a mistake - to be specific that code is completely incorrect |
@RonnyPfannschmidt though if I try to use similar idea in 1 it does work for me. Can you elaborate on what its trying to do there in scenario 1 though its not supported and how its working. |
@tareqalayan the code paths im aware of support only function names there - if having a function there does actually have an effect thats an accident and should actually trigger an error |
@RonnyPfannschmidt Thanks. Also you can see there is a slight change in fixture definition. When we pass function as an argument to usesfixture, the fixture too takes an parameter. I didnt quiet really understand what is happening there.
If we dont define 'f' as an parameter to the fixture it throws an error. |
please show that error |
what is 'f' here ? is it the request object??
…On 14 March 2018 at 15:56, Ronny Pfannschmidt ***@***.***> wrote:
please show that error
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3308 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AYTNhcMY8cTVINGkrDSKrZEQFI5rwIiuks5tePBggaJpZM4SqFcH>
.
--
அன்புடன்,
பா. அருண் காளி ராசா
|
@RonnyPfannschmidt yes it should be log_global_env_facts.name |
issue #3308: fix example in documentation
Fixed in #3309 |
Question: Can someone explain the below two uses of @pytest.mark.usefixtures and how does each of them work. I would like to understand the difference in the marker and fixture definition/usage.
The text was updated successfully, but these errors were encountered: