test ensure_user_environment

verify behavior for:

- current version (no change)
- old, supported version (upgrade, but not too far)
- too old, re-run installer
- directory exists, no conda
This commit is contained in:
Min RK
2023-03-23 12:34:44 +01:00
parent 594b61003f
commit 4d42f24e48
4 changed files with 120 additions and 3 deletions

View File

@@ -224,7 +224,7 @@ def ensure_user_environment(user_requirements_txt_file):
if not found_conda:
if os.path.exists(USER_ENV_PREFIX):
logger.warning(
f"Found prefix at {USER_ENV_PREFIX}, but too old or missing conda/mamba ({have_versions}). Rebuilding env from scratch!!"
f"Found prefix at {USER_ENV_PREFIX}, but too old or missing conda/mamba ({have_versions}). Upgrading from mambaforge."
)
# FIXME: should this fail? I'm not sure how destructive it is
logger.info("Downloading & setting up user environment...")