Tagged articles
5 articles
Page 1 of 1
Test Development Learning Exchange
Test Development Learning Exchange
Nov 16, 2025 · Operations

Automate Test Data Cleanup with pytest Fixtures and Yield

Effective test automation requires clean environments; this guide shows how pytest's fixture yield pattern can automatically set up and tear down resources—such as users, orders, and products—ensuring zero‑pollution, reliable CI runs, and maintainable code through scoped fixtures and best‑practice tips.

Pythonfixturepytest
0 likes · 6 min read
Automate Test Data Cleanup with pytest Fixtures and Yield
Test Development Learning Exchange
Test Development Learning Exchange
Oct 9, 2024 · Backend Development

Understanding pytest Fixtures: Concepts, Scope, Dependencies, Parameterization, and Usage

This article explains pytest fixtures, covering their basic concept, definition, scope options (function, module, class, session), dependencies, parameterization, use of yield for cleanup, common usage scenarios such as data preparation, database connections, and mock objects, as well as custom markers and global registration.

Automationfixturepytest
0 likes · 7 min read
Understanding pytest Fixtures: Concepts, Scope, Dependencies, Parameterization, and Usage