Explorar o código

test for commit _deserialize

Yifan Zhang %!s(int64=13) %!d(string=hai) anos
pai
achega
e2600932a0
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      dulwich/tests/test_objects.py

+ 6 - 0
dulwich/tests/test_objects.py

@@ -307,6 +307,12 @@ class CommitSerializationTests(TestCase):
         c = self.make_commit(commit_timezone=(-1 * 3600))
         self.assertTrue(" -0100\n" in c.as_raw_string())
 
+    def test_deserialize(self):
+        c = self.make_commit()
+        d = Commit()
+        d._deserialize(c.as_raw_chunks())
+        self.assertEqual(c, d)
+
 
 default_committer = 'James Westby <jw+debian@jameswestby.net> 1174773719 +0000'