<div dir="ltr">Hi All,<div><br></div><div>I have two questions regarding fixtures..</div><div><br></div><div>1. I have a .py file where i have defined two Autouse fixtures.. fixtureMod_1 is module scoped and fixtureFunc_1 is function scoped.. Now in conftest.py i have imported these two fixtures.. in my test_x.py i have a another module scoped fixture say fixtureMod_2..The order of execution of fixture seems to be fixtureMod_1,fixtureFunc_1 and then fixtureMod_2.. isnt module level fixtures supposed to be executed before function level fixtures?? isnt that how scopes are ordered.. i am able to solve the issues by giving fixtureMod_2  as a dependency to fixtureFunc_1.. but still i am trying to understand why pytest respects the scope ordering in this case.. does the order of sourcing the fixture override the scope based ordering??</div><div><br></div><div>2. I have one usecase where i want to dynamically create a fixture chain.. say i mark by testcase with useCaseA and that translates to an ordering of fixture.. can i add a fixture to a testcase at run time.. at pytest_generate_test phase or pytest_configure phase?? i found a method called add_marker to add a marker at runt time.. since fixtures can also be added via markers i was trying to explore if can use that method but it doesnt accept any parameters.. any way i can achieve this??</div><div><br></div><div><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">அன்புடன்,<br>
பா. அருண் காளி ராசா </div>
</div></div>