summaryrefslogtreecommitdiff
path: root/test/git/test_refs.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/git/test_refs.py')
-rw-r--r--test/git/test_refs.py4
1 files changed, 4 insertions, 0 deletions
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)