Skip to content

Commit

Permalink
Test case for Walker simplify_first_parent
Browse files Browse the repository at this point in the history
  • Loading branch information
petrhosek committed Dec 20, 2013
1 parent 19b15ed commit 3cc0662
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/test_revwalk.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ def test_sort(self):
walker.sort(GIT_SORT_TIME | GIT_SORT_REVERSE)
self.assertEqual([x.hex for x in walker], list(reversed(log)))

def test_simplify_first_parent(self):
walker = self.repo.walk(log[0], GIT_SORT_TIME)
walker.simplify_first_parent()
self.assertEqual(len(list(walker)), 3)

if __name__ == '__main__':
unittest.main()

0 comments on commit 3cc0662

Please sign in to comment.