diff --git a/doc/changelog.d/655.fixed.md b/doc/changelog.d/655.fixed.md new file mode 100644 index 000000000..4efbe0926 --- /dev/null +++ b/doc/changelog.d/655.fixed.md @@ -0,0 +1 @@ +Sim export_unittest for windows \ No newline at end of file diff --git a/tests/helper.py b/tests/helper.py index 21f53319c..d62b410a1 100644 --- a/tests/helper.py +++ b/tests/helper.py @@ -128,6 +128,15 @@ def remove_file(path): ---------- path (str) - path of the file. """ + + def rmtree(f: Path): + if f.is_file(): + f.unlink() + else: + for child in f.iterdir(): + rmtree(child) + f.rmdir() + if config.get("SpeosServerOnDocker"): subprocess.call( "docker exec " @@ -138,4 +147,4 @@ def remove_file(path): shell=True, ) else: - Path(path).unlink() + rmtree(Path(path))