为什么我无法在pytestfixture中设置self.param值?class TestClass: def setup_class(self, test_env)remove_setting(self.param)
E AttributeError: 'TestClass' object has no attribute 'param
我使用FastApi和SqlAlchemy作为context managerdef get_session(): # need to patch all over testsdependencies users = session.query(Users).all()我需要在所有测试中覆盖get_session (我使用pytest)
我可以用@pa