Pytest Fixtures and Yield

Hi 👋 In this short article I want to explain the use of the yield keyword in pytest fixtures. What is pytest? Pytest is a complex python framework used for writing tests. It has lots of advanced features and it supports plugins. Many projects prefer pytest in addition to Python’s unitttest library. What is a fixture? A test fixture is a piece of code that fixes some common functionality that is required for writing the unit tests....

December 14, 2021 · 3 min · Denis Nuțiu