diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2009-10-28 10:58:24 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2009-10-28 10:58:24 +0100 |
commit | 87afd252bd11026b6ba3db8525f949cfb62c90fc (patch) | |
tree | c84aa9aef07e916e6c306df5552e9c9861edc077 /test/git/test_remote.py | |
parent | 2f8e6f7ab1e6dbd95c268ba0fc827abc62009013 (diff) | |
download | gitpython-87afd252bd11026b6ba3db8525f949cfb62c90fc.tar.gz |
tag handling tests finished, unfortunately there is not yet a rejected case, but it will assuambly follow with the push tests
Diffstat (limited to 'test/git/test_remote.py')
-rw-r--r-- | test/git/test_remote.py | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/test/git/test_remote.py b/test/git/test_remote.py index 638cb103..6870e0e5 100644 --- a/test/git/test_remote.py +++ b/test/git/test_remote.py @@ -106,14 +106,22 @@ class TestRemote(TestBase): # add new tag reference rtag = TagReference.create(remote_repo, "1.0-RV_hello.there") res = fetch_and_test(remote, tags=True) - ltag = res[str(rtag)] - assert isinstance(ltag.ref, TagReference) - - # delete tag + tinfo = res[str(rtag)] + assert isinstance(tinfo.ref, TagReference) and tinfo.ref.commit == rtag.commit + assert tinfo.flags & tinfo.NEW_TAG # adjust tag commit + rtag.object = rhead.commit.parents[0].parents[0] + res = fetch_and_test(remote, tags=True) + tinfo = res[str(rtag)] + assert tinfo.commit == rtag.commit + assert tinfo.flags & tinfo.TAG_UPDATE + + # delete remote tag - local one will stay + TagReference.delete(remote_repo, rtag) + res = fetch_and_test(remote, tags=True) + self.failUnlessRaises(IndexError, get_info, res, remote, str(rtag)) - self.fail("tag handling, tag uptodate, new tag, new branch") def _test_pull(self,remote, rw_repo, remote_repo): # pull is essentially a fetch + merge, hence we just do a light |