Currently, this is not possible. The subclass must redefine the fixture and set the variable in its argument. Also, setting the variable in the fixture proxy object prior the setup phase does not work either. It'd be nice to be able to do the following:
class BaseFixture(...):
x = variable(int)
class MyBaseTest(...):
fixt = fixture(BaseFixture, ...)
class MyTest(MyBaseTest):
# Ideally
fixt.x = 10
# Or this
@run_after('init')
def set_x(self):
self.fixt.x = 10
Currently, this is not possible. The subclass must redefine the fixture and set the variable in its argument. Also, setting the variable in the fixture proxy object prior the setup phase does not work either. It'd be nice to be able to do the following: