git.samba.org
/
jelmer
/
dulwich-libgit2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
84c75ef
)
Add trivial test for write_pack_header.
author
Jelmer Vernooij
<jelmer@samba.org>
Mon, 26 Jul 2010 17:41:51 +0000
(19:41 +0200)
committer
Jelmer Vernooij
<jelmer@samba.org>
Mon, 26 Jul 2010 17:41:51 +0000
(19:41 +0200)
dulwich/tests/test_pack.py
patch
|
blob
|
history
diff --git
a/dulwich/tests/test_pack.py
b/dulwich/tests/test_pack.py
index b6aea48daebce2677504b98113697ca732dd3319..2fd5fbb96952bb2fd99187550964b8664e3424dc 100644
(file)
--- a/
dulwich/tests/test_pack.py
+++ b/
dulwich/tests/test_pack.py
@@
-44,6
+44,7
@@
from dulwich.pack import (
create_delta,
load_pack_index,
read_zlib_chunks,
+ write_pack_header,
write_pack_index_v1,
write_pack_index_v2,
write_pack,
@@
-277,6
+278,15
@@
class TestPack(PackTests):
self.assertEquals(pack1_sha, p.name())
+class WritePackHeaderTests(TestCase):
+
+ def test_simple(self):
+ f = StringIO()
+ write_pack_header(f, 42)
+ self.assertEquals('PACK\x00\x00\x00\x02\x00\x00\x00*',
+ f.getvalue())
+
+
pack_checksum = hex_to_sha('721980e866af9a5f93ad674144e1459b8ba3e7b7')