From f6102b349cbef03667d5715fcfae3161701a472d Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Fri, 4 Dec 2009 14:20:41 +0100 Subject: Reference: reading of commit data is now safer and handles non-existing paths - previously it would run into a code-branch I forgot --- test/git/test_refs.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/git/test_refs.py') diff --git a/test/git/test_refs.py b/test/git/test_refs.py index 584f6e89..2cddf862 100644 --- a/test/git/test_refs.py +++ b/test/git/test_refs.py @@ -274,6 +274,10 @@ class TestRefs(TestBase): assert ref_new_name.object == orig_obj assert ref_new_name == ref # END for each name type + + # References that don't exist trigger an error if we want to access them + self.failUnlessRaises(ValueError, getattr, Reference(rw_repo, "refs/doesntexist"), 'commit') + # exists, fail unless we force ex_ref_path = far_away_head.path self.failUnlessRaises(OSError, ref.rename, ex_ref_path) -- cgit v1.2.1