Commit d716704a by Sébastien Eustace

Fix handling of root incompatibilities

parent ba9c7c32
......@@ -8,8 +8,6 @@ from .incompatibility_cause import ConflictCause
class SolveFailure(Exception):
def __init__(self, incompatibility): # type: (Incompatibility) -> None
assert incompatibility.terms[0].dependency.is_root
self._incompatibility = incompatibility
@property
......
......@@ -51,6 +51,20 @@ Because bar (1.0.0) depends on shared (>3.0.0)
So, because myapp depends on both foo (1.0.0) and bar (1.0.0), version solving failed."""
check_solver_result(root, provider, error=error)
check_solver_result(root, provider, error=error)
def test_disjoint_root_constraints(root, provider, repo):
root.add_dependency("foo", "1.0.0")
root.add_dependency("foo", "2.0.0")
add_to_repo(repo, "foo", "1.0.0")
add_to_repo(repo, "foo", "2.0.0")
error = """\
Because myapp depends on both foo (1.0.0) and foo (2.0.0), version solving failed."""
check_solver_result(root, provider, error=error)
def test_no_valid_solution(root, provider, repo):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment