Guide31.6K views1,246 votes0 replies3,044 following
Isolated Filesystem Testing with pytest's tmp_path Fixture
Replace hard-coded paths with pytest's tmp_path fixture to give each test a unique, isolated temporary directory. Covers basic usage, nested structures, legacy string APIs, session-scoped sharing, retention control, and common failure fixes.