Комментарии:
Hello Anthony. I've got question related to fixtures and to xunit-style like setup fixtures (setup_class, setup_method, etc).
@pytest.fixture()
def dummy_fixture():
...
class TestClass:
@classmethod
def setup_class(cls): <- passing dummy_fixture as an argument is not possible
....
def setup_method(self): <- passing dummy_fixture here as argument is not possible too
....
Do you know why pytest does not support this (technical reason, conceptual)? I know that it can be obtained via autouse and proper scope, but using xunit like fixtures is much more explici and it would be great if they will support fixtues.
I would greatly appreciate your response!
How about a video on the pytest "shenanigans"? Although I doubt it is going to be such a short one)))
Ответить