Sometimes when testing I want to replace a file with a test file.

This context manager does that.

Uses pathlib.