I just found that pytest provides tmp_path which is probably a better way to handle tempfiles in tests compared to the current tempfile.NamedTemporaryFile approach, especially because the behaviour of tempfile classes is platform-dependent (mainly causing issues on Windows).
I just found that pytest provides
tmp_path
which is probably a better way to handle tempfiles in tests compared to the currenttempfile.NamedTemporaryFile
approach, especially because the behaviour oftempfile
classes is platform-dependent (mainly causing issues on Windows).