summaryrefslogtreecommitdiff
path: root/test/git/test_repo.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/git/test_repo.py')
-rw-r--r--test/git/test_repo.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/git/test_repo.py b/test/git/test_repo.py
index df495e71..0b196a1f 100644
--- a/test/git/test_repo.py
+++ b/test/git/test_repo.py
@@ -38,6 +38,14 @@ class TestRepo(TestBase):
assert isinstance(self.rorepo.heads.master, Head)
assert isinstance(self.rorepo.heads['master'], Head)
+
+ def test_tree_from_revision(self):
+ tree = self.rorepo.tree('0.1.6')
+ assert tree.type == "tree"
+ assert self.rorepo.tree(tree) == tree
+
+ # try from invalid revision that does not exist
+ self.failUnlessRaises(ValueError, self.rorepo.tree, 'hello world')
@patch_object(Git, '_call_process')
def test_commits(self, git):