Yes. This was exactly what I was telling you to do when I told you to create temp files. Everything you create should be a temp file and all your temp files should be cleaned up at the end of the unit test.

Many of our unit tests make use of temp files. You can find an example of how to do a temp database in the database unit tests [1].

[1] https://github.com/Freeseer/freeseer/blob/master/src/freeseer/tests/framework/test_database.py