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

@@ -96,7 +96,7 @@ def download_miniconda_installer(installer_url, sha256sum):
t = time.perf_counter() - tic
logger.info(f"Downloaded conda installer {installer_url} in {t:.1f}s")
if sha256_file(f.name) != sha256sum:
if sha256sum and sha256_file(f.name) != sha256sum:
raise Exception("sha256sum hash mismatch! Downloaded file corrupted")
yield f.name