Skip to content

Latest commit

 

History

History
4 lines (3 loc) · 531 Bytes

12065.bugfix.rst

File metadata and controls

4 lines (3 loc) · 531 Bytes

Fixed a regression in pytest 8.0.0 where test classes containing setup_method and tests using @staticmethod or @classmethod would crash with AttributeError: 'NoneType' object has no attribute 'setup_method'.

Now the :attr:`request.instance <pytest.FixtureRequest.instance>` attribute of tests using @staticmethod and @classmethod is no longer None, but a fresh instance of the class, like in non-static methods. Previously it was None, and all fixtures of such tests would share a single self.