Skip to content

Commit 0f53b36

Browse files
committed
test: Add non-regression test
Signed-off-by: Julien Jerphanion <[email protected]>
1 parent c9c4580 commit 0f53b36

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

micromamba/tests/test_create.py

+27
Original file line numberDiff line numberDiff line change
@@ -1495,3 +1495,30 @@ def memory_intensive_operation():
14951495
pytest.fail(
14961496
f"test_create_with_empty_lines_and_comments exceeded memory limit of {memory_limit} MB (used {max_memory:.2f} MB)"
14971497
)
1498+
1499+
1500+
def test_update_spec_list(tmp_path):
1501+
env_prefix = tmp_path / "env-invalid_spec"
1502+
1503+
env_spec = """
1504+
# This file may be used to create an environment using:
1505+
# $ conda create --name <env> --file <this file>
1506+
# platform: linux-64
1507+
@EXPLICIT
1508+
https://conda.anaconda.org/conda-forge/noarch/pip-24.3.1-pyh145f28c_2.conda#76601b0ccfe1fe13a21a5f8813cb38de
1509+
"""
1510+
1511+
env_spec_file = tmp_path / "env_spec.txt"
1512+
1513+
update_specs_list = """
1514+
Updating specs:
1515+
1516+
- pip==24.3.1=pyh145f28c_2
1517+
"""
1518+
1519+
with open(env_spec_file, "w") as f:
1520+
f.write(env_spec)
1521+
1522+
out = helpers.create("-p", env_prefix, "-f", env_spec_file, "--dry-run")
1523+
1524+
assert update_specs_list in out

0 commit comments

Comments
 (0)