Fix: issues on Python tests for Windows
Context
The goal is to run the Python tests on Windows device.
Major changes
The test creates a temporary file and keeps it open, which causes a permission conflict when the function tries to write to the same file. On Windows, files are exclusive, so opening a file in one process prevents another from opening it
Edited by Maxence Naud