class TestFoo:

    def setup_class(cls):
        cls.n = params

@pytest.mark.parametrize('n', params)
def test_something(self, n):
    assert n != 'D'

@pytest.mark.parametrize('n', params)
def test_something_else(self, n):
    assert n != 'D'

def test_internal(self):
    assert self.n != params
pytest: как передать параметр класса в setup_class