@pytest.fixture(scope='class', params=params)
def n(request):
    print(('setup once per each param', request.param))
return request.param


class TestFoo:

    def test_something(self, n):
        assert n != 'D'

def test_something_else(self, n):
    pass
pytest: How to pass a class parameter to setup_class