From 20f202d83bdf1f332a3cb8f010bcf8bf3c2807bd Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Sun, 11 Oct 2009 16:36:51 +0200 Subject: 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 --- test/git/test_base.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/git/test_base.py') 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" ) -- cgit v1.2.3