setup_class does not work well with @pytest.fixture #11330
-
What I want: I need a session level setup for some data, this data need by the test scripts/tests, Also test scripts has some class level setup. Workaround: I can use fixture directly in test case like:
#Execution logs: test3.py::Test3::test_01 ABC Session Level SetupInside Test3 setup_module ABC Session Level TearDown========================================================================== 3 passed in 0.00s ==========================================================================
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 14 replies
-
Set the fixture scope to |
Beta Was this translation helpful? Give feedback.
for one, assign things to type(self).foo instead of self.foo
i believe we have a number of issues about needing to error on class scope fixtures in classes that take self