diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2009-10-11 16:36:51 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2009-10-11 16:36:51 +0200 |
commit | 20f202d83bdf1f332a3cb8f010bcf8bf3c2807bd (patch) | |
tree | 97eff8e6a86c55606f118218968c678a7647b552 /test/git/test_base.py | |
parent | 9ee31065abea645cbc2cf3e54b691d5983a228b2 (diff) | |
download | gitpython-20f202d83bdf1f332a3cb8f010bcf8bf3c2807bd.tar.gz |
Re-designed the tag testing - it does not use fixtures anymore but dyamically checks the existance of tags within the repository - it basically tests the interface and checks that expected return types are actually returned
Diffstat (limited to 'test/git/test_base.py')
-rw-r--r-- | test/git/test_base.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/git/test_base.py b/test/git/test_base.py index 46869f63..787b92b6 100644 --- a/test/git/test_base.py +++ b/test/git/test_base.py @@ -7,6 +7,7 @@ import time from test.testlib import * from git import * +import git.base as base class TestBase(object): @@ -33,4 +34,11 @@ class TestBase(object): def test_tags(self): # tag refs can point to tag objects or to commits assert False, "TODO: Tag handling" + + def test_get_type_by_name(self): + for tname in base.Object.TYPES: + assert base.Object in base.Object.get_type_by_name(tname).mro() + # END for each known type + + assert_raises( ValueError, base.Object.get_type_by_name, "doesntexist" ) |