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.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/git/test_refs.py b/test/git/test_refs.py
index 3d85356f..58a51f4a 100644
--- a/test/git/test_refs.py
+++ b/test/git/test_refs.py
@@ -14,6 +14,16 @@ import os
class TestRefs(TestBase):
+ def test_from_path(self):
+ # should be able to create any reference directly
+ for ref_type in ( Reference, Head, TagReference, RemoteReference ):
+ for name in ('rela_name', 'path/rela_name'):
+ full_path = ref_type.to_full_path(name)
+ instance = ref_type.from_path(self.rorepo, full_path)
+ assert isinstance(instance, ref_type)
+ # END for each name
+ # END for each type
+
def test_tag_base(self):
tag_object_refs = list()
for tag in self.rorepo.tags: