From c662c6d9397b0260c56f10c2c65cff843ee8de6f Mon Sep 17 00:00:00 2001 From: Mischan Toosarani-Hausberger Date: Fri, 10 Apr 2026 13:18:44 +0200 Subject: [PATCH] fix(test): replace wasteful copytree with symlink in the windows UTF8_TEST --- tests/cmake.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/cmake.py b/tests/cmake.py index 9e8c00a0a1..9d043b10bd 100644 --- a/tests/cmake.py +++ b/tests/cmake.py @@ -58,9 +58,9 @@ def compile(self, targets, options=None, cflags=None): # Inject a sub-path into the temporary build directory as the CWD for all tests to verify UTF-8 path handling. if os.environ.get("UTF8_TEST_CWD"): # this is Thai and translates to "this is a test directory" - utf8_subpath = build_tmp_path / "นี่คือไดเร็กทอรีทดสอบ" - shutil.rmtree(utf8_subpath, ignore_errors=True) - shutil.copytree(build_tmp_path, utf8_subpath, dirs_exist_ok=True) + utf8_parent = self.factory.mktemp("utf8") + utf8_subpath = utf8_parent / "นี่คือไดเร็กทอรีทดสอบ" + utf8_subpath.symlink_to(build_tmp_path, target_is_directory=True) return utf8_subpath return build_tmp_path