#14071 added a deprecation warning for:
import pytest
class TestFixture:
@pytest.fixture(scope="class")
# without @classmethod
def fixt(self):
self.x = 23
def test_fixt(self, fixt):
print(self.x)
because that doesn't work which might be surprising to people.
However, the same issue exists with scopes module, package and session as well. We should extend the deprecation to those, and require that those are @staticmethod.
#14071 added a deprecation warning for:
because that doesn't work which might be surprising to people.
However, the same issue exists with scopes
module,packageandsessionas well. We should extend the deprecation to those, and require that those are@staticmethod.