Skip to content

Commit

Permalink
Test with xtensor-python instead of unmaintained xframe
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanMabille committed Apr 30, 2024
1 parent 46036e1 commit e150b77
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions micromamba/tests/test_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def test_specs(tmp_home, tmp_root_prefix, tmp_path, source, file_type, create_cm
specs = []

if source in ("cli_only", "both"):
specs = ["xframe", "xtl"]
specs = ["xtensor-python", "xtl"]
cmd += specs

if source in ("spec_file_only", "both"):
Expand Down Expand Up @@ -736,7 +736,7 @@ def test_channel_nodefaults(tmp_home, tmp_root_prefix, tmp_path):
" - yaml",
" - nodefaults",
"dependencies:",
" - xframe",
" - xtensor-python",
]
with open(spec_file, "w") as f:
f.write("\n".join(contents))
Expand Down
14 changes: 7 additions & 7 deletions micromamba/tests/test_remove.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ def test_remove(tmp_home, tmp_root_prefix, env_selector, tmp_xtensor_env, tmp_en
@pytest.mark.skipif(sys.platform == "win32", reason="This test is currently failing on Windows")
def test_remove_orphaned(tmp_home, tmp_root_prefix, tmp_xtensor_env, tmp_env_name):
env_pkgs = [p["name"] for p in helpers.umamba_list("-p", tmp_xtensor_env, "--json")]
helpers.install("xframe", "-n", tmp_env_name, no_dry_run=True)
helpers.install("xtensor-python", "-n", tmp_env_name, no_dry_run=True)

res = helpers.remove("xframe", "-p", tmp_xtensor_env, "--json")
res = helpers.remove("xtensor-python", "-p", tmp_xtensor_env, "--json")

keys = {"dry_run", "success", "prefix", "actions"}
assert keys.issubset(set(res.keys()))
assert res["success"]
assert len(res["actions"]["UNLINK"]) == 1
assert res["actions"]["UNLINK"][0]["name"] == "xframe"
assert res["actions"]["UNLINK"][0]["name"] == "xtensor-python"
assert res["actions"]["PREFIX"] == str(tmp_xtensor_env)

res = helpers.remove("xtensor", "-p", tmp_xtensor_env, "--json")
Expand All @@ -67,7 +67,7 @@ def test_remove_orphaned(tmp_home, tmp_root_prefix, tmp_xtensor_env, tmp_env_nam
def test_remove_force(tmp_home, tmp_root_prefix, tmp_xtensor_env, tmp_env_name):
# check that we can remove a package without solving the environment (putting
# it in a bad state, actually)
helpers.install("xframe", "-n", tmp_env_name, no_dry_run=True)
helpers.install("xtensor-python", "-n", tmp_env_name, no_dry_run=True)

res = helpers.remove("xtl", "-p", str(tmp_xtensor_env), "--json", "--force")

Expand All @@ -81,7 +81,7 @@ def test_remove_force(tmp_home, tmp_root_prefix, tmp_xtensor_env, tmp_env_name):

@pytest.mark.parametrize("shared_pkgs_dirs", [True], indirect=True)
def test_remove_no_prune_deps(tmp_home, tmp_root_prefix, tmp_xtensor_env, tmp_env_name):
helpers.install("xframe", "-n", tmp_env_name, no_dry_run=True)
helpers.install("xtensor-python", "-n", tmp_env_name, no_dry_run=True)

res = helpers.remove("xtensor", "-p", tmp_xtensor_env, "--json", "--no-prune-deps")

Expand All @@ -91,7 +91,7 @@ def test_remove_no_prune_deps(tmp_home, tmp_root_prefix, tmp_xtensor_env, tmp_en
assert len(res["actions"]["UNLINK"]) == 2
removed_names = [x["name"] for x in res["actions"]["UNLINK"]]
assert "xtensor" in removed_names
assert "xframe" in removed_names
assert "xtensor-python" in removed_names
assert res["actions"]["PREFIX"] == str(tmp_xtensor_env)


Expand Down Expand Up @@ -186,7 +186,7 @@ def remove_config_common_assertions(res, root_prefix, target_prefix):


def test_remove_config_specs(tmp_home, tmp_root_prefix, tmp_prefix):
specs = ["xframe", "xtl"]
specs = ["xtensor-python", "xtl"]
cmd = list(specs)

res = helpers.remove(*cmd, "--print-config-only")
Expand Down
2 changes: 1 addition & 1 deletion micromamba/tests/test_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ def test_specs(self, source, file_type, env_created):
specs = []

if source in ("cli_only", "both"):
specs = ["xframe", "xtl"]
specs = ["xtensor-python", "xtl"]
cmd = list(specs)

if source in ("spec_file_only", "both"):
Expand Down

0 comments on commit e150b77

Please sign in to comment.