Remove umamba/tests PATH cleaning on Windows

This commit is contained in:
AntoinePrv 2022-09-09 09:33:07 +02:00
parent 8a31b22905
commit bd94b721be
1 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,6 @@
import os
import pathlib
import platform
from typing import Generator
import pytest
@ -57,7 +58,8 @@ def tmp_clean_env(
) -> bool:
if "condabin" in p:
return False
if prefix is not None:
# On windows, PATH is also used for dyanamic libraries.
if (prefix is not None) and (platform.system() != "Windows"):
p = str(pathlib.Path(p).expanduser().resolve())
prefix = str(pathlib.Path(prefix).expanduser().resolve())
return not p.startswith(prefix)