[pytest-dev] Parametrized scope question
alexn at final.co.il
Mon Dec 14 10:50:57 EST 2015
I'm new to Pytest and I encounter something I cannot explain.
I'm trying to give fixture fixt_func() a parameter fixt_prm and expect the fixture to be called only once as it defined with 'class' scope, but the fixture is called twice as it ignores the scope. What am I missing?
def fixt_func(request, resource, fixt_prm):
@pytest.mark.parametrize('resource', ['x'], scope='class')
@pytest.mark.parametrize(fixt_prm ', ['x'], scope='class')
@pytest.mark.parametrize('prm', ['a', 'b'])
def test_a(self, prm, fixt_func)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the pytest-dev