MemotivaTesting in Python

What are pytest fixtures?

Testing in Python

Audio flashcard · 0:15

Nortren·

What are pytest fixtures?

0:15

Fixtures are functions decorated with pytest.fixture that provide shared setup for tests. A test that takes a fixture name as a parameter receives the fixture's return value. Fixtures can have scopes from function up to session and can yield to provide cleanup. They replace setUp and tearDown methods.
docs.pytest.org