Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: conflict paths returns iter of iter of clause #187

Merged
merged 2 commits into from
Apr 27, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion simplesat/sat/minisat.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def get_neighbors(clause):
# If there aren't two end points then none of this makes any sense.
# Just return what we have.
if len(end_clauses) < 2:
return end_clauses
return (end_clauses,)

ends = OrderedDict.fromkeys(end_clauses)
ends = tuple(ends.keys())
Expand Down
15 changes: 15 additions & 0 deletions simplesat/tests/broken_metadata_self_conflict.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
packages:
- A 10.2-1
- B 10.3-1; conflicts (A)
- C 1.7.1-1; depends (A, B)

request:
- operation: "install"
requirement: "C"

failure:
requirements: ['C']
raw: |
Conflicting requirements:
Requirements: 'C'
Install command rule (+C-1.7.1-1)
3 changes: 3 additions & 0 deletions simplesat/tests/test_scenarios_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ def test_no_candidate(self):
def test_three_way_conflict(self):
self._check_solution("three_way_conflict.yaml")

def test_conflicting_single_package_dependencies(self):
self._check_solution("broken_metadata_self_conflict.yaml")


class TestInstallSet(ScenarioTestAssistant, TestCase):

Expand Down