heheh yeah I could probably show how fixtures actually work and how assertion rewriting actually works -- the rest of pytest is mostly non-magical beyond those two things
Is there a case when one should consider loading fixtures by writing a pytest plugin rather using root conftest.py. exp: running tests in multiple folders without one common test-root path (multiple git projects using same fixtures)?
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):
How about a video on the pytest "shenanigans"? Although I doubt it is going to be such a short one)))
heheh yeah I could probably show how fixtures actually work and how assertion rewriting actually works -- the rest of pytest is mostly non-magical beyond those two things
Is there a case when one should consider loading fixtures by writing a pytest plugin rather using root conftest.py. exp: running tests in multiple folders without one common test-root path (multiple git projects using same fixtures)?
I really only make "plugins" if I need to share them across projects. or if conftest gets to be like 1k+ lines
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):
xunit setup / teardown is only provided as a legacy migration mechanism and does not mix with pytest fixturing
Awesome, I’ve always hated that. Nice fix.