From 3203cd7629345d32806f470a308975076b2b4686 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 24 Nov 2010 19:48:44 +0100 Subject: Fixed doc strings, improved error checking on RefLog.write method --- test/test_reflog.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test/test_reflog.py') diff --git a/test/test_reflog.py b/test/test_reflog.py index 5c4a21b8..3fdf1fae 100644 --- a/test/test_reflog.py +++ b/test/test_reflog.py @@ -56,6 +56,8 @@ class TestRefLog(TestBase): self.failUnlessRaises(ValueError, RefLog.from_file, fixture_path(pp+suffix)) #END for each invalid file + # cannot write an uninitialized reflog + self.failUnlessRaises(ValueError, RefLog().write) # test serialize and deserialize - results must match exactly binsha = chr(255)*20 @@ -65,6 +67,7 @@ class TestRefLog(TestBase): reflog = RefLog.from_file(rlp) tfile = os.path.join(tdir, os.path.basename(rlp)) reflog.to_file(tfile) + assert reflog.write() is reflog # parsed result must match ... treflog = RefLog.from_file(tfile) -- cgit v1.2.3