Jan-07-2020, 03:10 PM
(Jan-07-2020, 12:54 PM)ftg Wrote: Intuitively, I would say that I prefer the test to remain "under" python control.
I think that's a good approach. Having the extra step somewhere else means it's a bit hidden and it's easy to forget about it.
Quote:By the way if I use tempfile.TemporaryFile context manager, will I be able to remove the files with my function during all the time it is activated?
I'm not sure what you mean really. Even without the context manager, you can create and remove the files in the set up/tear down steps.