Simon Willison’s Weblog

Subscribe

27th April 2020

TIL Session-scoped temporary directories in pytest — I habitually use the `tmpdir` fixture in pytest to get a temporary directory that will be cleaned up after each test, but that doesn't work with `scope="session"` - which can be used to ensure an expensive fixture is run only once per test session and the generated content is used for multiple tests.

Recent articles

This is a beat by Simon Willison, posted on 27th April 2020.

Monthly briefing

Sponsor me for $10/month and get a curated email digest of the month's most important LLM developments.

Pay me to send you less!

Sponsor & subscribe