Hello guys, 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?
@pytest.fixture(scope='class') def fixt_func(request, resource, fixt_prm): print fixt_prm class TestA(): @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) assert True
_______________________________________________ pytest-dev mailing list pytest-dev@python.org https://mail.python.org/mailman/listinfo/pytest-dev