Use pytest's tmp_path fixture
If you're not already using pytest's tmp_path
fixture, you really should.
The fixture provides a temporary directory for testing use. A directory that
you can't reference from other test runs or from other test functions in the
same run, but that isn't immediately deleted when your tests finish. The
directory is created in your account temporary location and is eventually
cleaned up by your computer's operating system. Until then, you can open the
directories and their files in other applications.
I've been making assertions on datasets in Rasterio's tests and also dragging them into QGIS for a closer look after the tests finish.