Skip to content

Commit

Permalink
pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimergp committed Jul 20, 2023
1 parent 08945d6 commit 64c8378
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion conda_libmamba_solver/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ def _specs_to_tasks_add(self, in_state: SolverInputState, out_state: SolverOutpu
if spec_str == self._spec_to_str(installed.to_match_spec()):
# if we just want to force things to STAY as they are, better pin them
key = "ADD_PIN", None

# ## Protect if installed AND history
if name in protected:
installed_spec = self._spec_to_str(installed.to_match_spec())
Expand Down
15 changes: 13 additions & 2 deletions tests/test_solver_differences.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,23 @@ def test_too_aggressive_update_to_conda_forge_packages():
EVERYTHING it can to conda-forge.
"""
with make_temp_env("conda", "python", "--override-channels", "--channel=defaults") as prefix:
cmd = "install", "-p", prefix, "-c", "conda-forge", "libzlib", "--json", "--dry-run", "-y", "-vvv"
cmd = (
"install",
"-p",
prefix,
"-c",
"conda-forge",
"libzlib",
"--json",
"--dry-run",
"-y",
"-vvv",
)
env = os.environ.copy()
env.pop("CONDA_SOLVER", None)
p_classic = conda_subprocess(*cmd, "--solver=classic", explain=True, env=env)
p_libmamba = conda_subprocess(*cmd, "--solver=libmamba", explain=True, env=env)
data_classic = json.loads(p_classic.stdout)
data_libmamba = json.loads(p_libmamba.stdout)
assert len(data_classic["actions"]["LINK"]) < 10
assert len(data_classic["actions"]["LINK"]) < 10
assert len(data_libmamba["actions"]["LINK"]) < 10

0 comments on commit 64c8378

Please sign in to comment.