Skip to content Skip to sidebar Skip to footer

Py.test Method To Be Executed Only Once Per Run

Im new to pytest(and python). In have set of things to be executed only once before all my tests(ex:- starting android emulator, creating appium driver, instantiating all my page c

Solution 1:

This happens because you define your fixtures inside a class and then subclass it, causing the fixtures to be defined twice.

Instead you should just define the fixtures as normal functions, and either change your tests to be functions as well, or not inherit from any base class if you want to use classes for grouping tests.

Post a Comment for "Py.test Method To Be Executed Only Once Per Run"