diff --git a/test/lib/helper.py b/test/lib/helper.py index 2fb8990dd..1fdc56fd1 100644 --- a/test/lib/helper.py +++ b/test/lib/helper.py @@ -400,8 +400,12 @@ class VirtualEnvironment: __slots__ = ("_env_dir",) def __init__(self, env_dir, *, with_pip): - self._env_dir = env_dir - venv.create(env_dir, symlinks=(os.name != "nt"), with_pip=with_pip) + if os.name == "nt": + self._env_dir = osp.realpath(env_dir) + venv.create(self.env_dir, symlinks=False, with_pip=with_pip) + else: + self._env_dir = env_dir + venv.create(self.env_dir, symlinks=True, with_pip=with_pip) @property def env_dir(self):