diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2009-11-04 13:17:37 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2009-11-04 13:17:37 +0100 |
commit | f41d42ee7e264ce2fc32cea555e5f666fa1b1fe9 (patch) | |
tree | 1d45b8f6fd8a6114b120e13844cc05e930793297 /test/git/test_repo.py | |
parent | c4cde8df886112ee32b0a09fcac90c28c85ded7f (diff) | |
download | gitpython-f41d42ee7e264ce2fc32cea555e5f666fa1b1fe9.tar.gz |
Improved cmd error handling in case an invalid revision is specified for an object
repo.tree: improved to be less restricting
Diffstat (limited to 'test/git/test_repo.py')
-rw-r--r-- | test/git/test_repo.py | 8 |
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): |