From 180a5029bc3a2f0c1023c2c63b552766dc524c41 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 17 Feb 2010 21:07:58 +0100 Subject: git.commit: Added test to assure we handle the first commit correctly regarding its parents --- test/git/test_commit.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/git/test_commit.py') diff --git a/test/git/test_commit.py b/test/git/test_commit.py index 570ea65e..1e0338d6 100644 --- a/test/git/test_commit.py +++ b/test/git/test_commit.py @@ -88,6 +88,11 @@ class TestCommit(TestBase): # traversal should stop when the beginning is reached self.failUnlessRaises(StopIteration, first.traverse().next) + # parents of the first commit should be empty ( as the only parent has a null + # sha ) + assert len(first.parents) == 0 + + @patch_object(Git, '_call_process') def test_rev_list_bisect_all(self, git): """ -- cgit v1.2.1