Skip to content

Commit

Permalink
Merge pull request #60 from jacobilsoe/resolverconfig
Browse files Browse the repository at this point in the history
Fixed comparison
  • Loading branch information
ohumbel committed Sep 15, 2015
2 parents bec0d88 + 52ea4bd commit 6129440
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion rtcFunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def is_user_aborting(change):
def getnextchangeset(currentchangeentry, changeentries):
nextchangeentry = None
nextindex = changeentries.index(currentchangeentry) + 1
has_next_changeset = nextindex is not len(changeentries)
has_next_changeset = not (nextindex == len(changeentries))
if has_next_changeset:
nextchangeentry = changeentries[nextindex]
return nextchangeentry
Expand Down
8 changes: 8 additions & 0 deletions tests/test_rtcFunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,14 @@ def test_collectChangeSetsToAcceptToAvoidMergeConflict_ShouldAdhereToMaxChangeSe
self.assertFalse(change3 in collectedchanges)
self.assertEqual(2, len(collectedchanges))

def test_collectChangeSetsToAcceptToAvoidMergeConflict_ShouldAcceptLargeAmountOfChangeSets(self):
changeentries = [self.createChangeEntry(str(i)) for i in range(1, 500)]
change1 = changeentries[0]

configuration.config = self.configBuilder.build()
collectedchanges = ImportHandler().collect_changes_to_accept_to_avoid_conflicts(change1, changeentries, 500)
self.assertEqual(499, len(collectedchanges))

@patch('builtins.input', return_value='Y')
def test_useragreeing_answeris_y_expecttrue(self, inputmock):
configuration.config = self.configBuilder.build()
Expand Down

0 comments on commit 6129440

Please sign in to comment.