summaryrefslogtreecommitdiff
path: root/test/git/test_base.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2009-10-11 16:36:51 +0200
committerSebastian Thiel <byronimo@gmail.com>2009-10-11 16:36:51 +0200
commit20f202d83bdf1f332a3cb8f010bcf8bf3c2807bd (patch)
tree97eff8e6a86c55606f118218968c678a7647b552 /test/git/test_base.py
parent9ee31065abea645cbc2cf3e54b691d5983a228b2 (diff)
downloadgitpython-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.py8
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" )