From 3cc0662defac69964751bad7fa273157c32affcf Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Fri, 20 Dec 2013 13:28:20 +0000 Subject: [PATCH] Test case for Walker simplify_first_parent --- test/test_revwalk.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/test_revwalk.py b/test/test_revwalk.py index 119f222..654ef47 100644 --- a/test/test_revwalk.py +++ b/test/test_revwalk.py @@ -102,6 +102,10 @@ class WalkerTest(utils.RepoTestCase): 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()