From 6f960586feccff8c1f2c717765eb0a5e8b9cd6f3 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Mon, 30 May 2011 21:14:22 +0200 Subject: Fixed remaining tests as good as possible. remote/fetch/pull and submodule tests need some more work. Also, the tests need to be reorganized and move closer to their actual location within gitpython. Hence the refs tests go to git.test.refs, etc --- git/test/test_refs.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'git/test/test_refs.py') diff --git a/git/test/test_refs.py b/git/test/test_refs.py index 2e018e7f..3e6c0b3a 100644 --- a/git/test/test_refs.py +++ b/git/test/test_refs.py @@ -4,13 +4,15 @@ # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php -from git.test.lib import TestBase -from git.ref import * -import git.ref as ref +from git.test.lib import TestBase, with_rw_repo +from git.refs import * +import git.refs as ref from git.util import Actor from git.objects.tag import TagObject +from git.exc import GitCommandError + from itertools import chain import os @@ -51,7 +53,7 @@ class TestRefs(TestBase): # END if we have a tag object # END for tag in repo-tags assert tag_object_refs - assert isinstance(TagReference.list_items(self.rorepo)['0.5.0'], TagReference) + assert isinstance(TagReference.list_items(self.rorepo)['0.1.6'], TagReference) def test_tags(self): # tag refs can point to tag objects or to commits @@ -69,7 +71,7 @@ class TestRefs(TestBase): assert len(s) == ref_count assert len(s|s) == ref_count - @with_rw_repo + @with_rw_repo("0.1.6") def test_heads(self, rw_repo): for head in Head.iter_items(rw_repo): assert head.name @@ -155,7 +157,7 @@ class TestRefs(TestBase): def test_orig_head(self): assert type(HEAD(self.rorepo).orig_head()) == SymbolicReference - @with_rw_repo + @with_rw_repo("0.1.6") def test_head_reset(self, rw_repo): cur_head = HEAD(rw_repo) old_head_commit = cur_head.commit -- cgit v1.2.1