diff --git a/micromamba/tests/env-create-export.yaml b/micromamba/tests/env-create-export.yaml index c4eeddf4dc..c137787843 100644 --- a/micromamba/tests/env-create-export.yaml +++ b/micromamba/tests/env-create-export.yaml @@ -1,4 +1,4 @@ channels: - https://conda.anaconda.org/conda-forge dependencies: - - micromamba=0.24.0 + - xtl=0.7.5 diff --git a/micromamba/tests/helpers.py b/micromamba/tests/helpers.py index 0707f3c98c..5774d8ca3a 100644 --- a/micromamba/tests/helpers.py +++ b/micromamba/tests/helpers.py @@ -71,7 +71,7 @@ def get_umamba(cwd=os.getcwd()): umamba_bin = "micromamba" umamba = os.path.join(cwd, "build", "micromamba", umamba_bin) if not Path(umamba).exists(): - print("MICROMAMBA NOT FOUND!") + raise RuntimeError("Micromamba not found! Set TEST_MAMBA_EXE env variable") return umamba diff --git a/micromamba/tests/test_env.py b/micromamba/tests/test_env.py index 3eaa2bb882..d80fd179f0 100644 --- a/micromamba/tests/test_env.py +++ b/micromamba/tests/test_env.py @@ -75,20 +75,18 @@ def test_env_export(export_env, explicit_flag, md5_flag, channel_subdir_flag): flags = filter(None, [explicit_flag, md5_flag, channel_subdir_flag]) output = helpers.run_env("export", "-n", export_env, *flags) if explicit_flag: - assert "/micromamba-0.24.0-0." in output + assert "/xtl-0.7.5-0." in output if md5_flag != "--no-md5": assert re.search("#[a-f0-9]{32}$", output.replace("\r", "")) else: ret = yaml.safe_load(output) assert ret["name"] == export_env assert set(ret["channels"]) == {"conda-forge"} - assert "micromamba=0.24.0=0" in str(ret["dependencies"]) + assert "xtl=0.7.5=0" in str(ret["dependencies"]) if md5_flag == "--md5": - assert re.search(r"micromamba=0.24.0=0\[md5=[a-f0-9]{32}\]", str(ret["dependencies"])) + assert re.search(r"xtl=0.7.5=0\[md5=[a-f0-9]{32}\]", str(ret["dependencies"])) if channel_subdir_flag: - assert re.search( - r"conda-forge/[a-z0-9-]+::micromamba=0.24.0=0", str(ret["dependencies"]) - ) + assert re.search(r"conda-forge/[a-z0-9-]+::xtl=0.7.5=0", str(ret["dependencies"])) def test_create(): diff --git a/micromamba/tests/test_shell.py b/micromamba/tests/test_shell.py index 1cd5ed54d1..318704f325 100644 --- a/micromamba/tests/test_shell.py +++ b/micromamba/tests/test_shell.py @@ -222,8 +222,9 @@ def test_init(tmp_home, tmp_root_prefix, shell_type, prefix_selector, multiple_t def test_dash(tmp_home, tmp_root_prefix): skip_if_shell_incompat("dash") - subprocess.check_call(["dash", "-c", "eval $(micromamba shell hook -s dash)"]) - subprocess.check_call(["dash", "-c", "eval $(micromamba shell hook -s posix)"]) + umamba = helpers.get_umamba() + subprocess.check_call(["dash", "-c", f"eval $({umamba} shell hook -s dash)"]) + subprocess.check_call(["dash", "-c", f"eval $({umamba} shell hook -s posix)"]) def test_implicitly_created_environment(tmp_home, tmp_root_prefix):