self = <swh.vault.tests.test_cookers.TestSnapshotCooker object at 0x7fec505d4e80>
git_loader = <function git_loader.<locals>._create_loader at 0x7fec5064ff28>
cook_extract_snapshot = <function cook_extract_snapshot_git_bare at 0x7fec518eb840>
def test_snapshot_tags(self, git_loader, cook_extract_snapshot):
(loader, main_rev_id) = self.load_repo_tags(git_loader)
snp_id = loader.loaded_snapshot_id
with cook_extract_snapshot(loader.storage, snp_id) as (ert, p):
> self.check_snapshot_tags(ert, p, main_rev_id)
.tox/py3/lib/python3.7/site-packages/swh/vault/tests/test_cookers.py:1062:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <swh.vault.tests.test_cookers.TestSnapshotCooker object at 0x7fec505d4e80>
ert = <swh.vault.tests.test_cookers.TestRepo object at 0x7fec5056d160>
p = PosixPath('/tmp/tmp-vault-clone-h1bg5ef0')
obj_id = b'u\xc1\xc5\x842~\x86\x8c\x1f\xd6\x18\xb1m\xc0\x98\x85x\xaf\x0b\xd5'
def check_snapshot_tags(self, ert, p, obj_id):
assert (
hashutil.hash_to_bytehex(obj_id)
== ert.repo.refs[b"HEAD"]
== ert.repo.refs[b"refs/heads/master"]
== ert.repo.refs[b"refs/remotes/origin/HEAD"]
== ert.repo.refs[b"refs/remotes/origin/master"]
== ert.repo.refs[b"refs/tags/t5"]
)
c2_id = ert.repo.refs[b"refs/tags/t2"]
c5_id = hashutil.hash_to_bytehex(obj_id)
assert ert.repo[c5_id].parents == [c2_id]
t5a = ert.repo[ert.repo.refs[b"refs/tags/t5a"]]
> assert t5a.message == b"tag 5"
E AssertionError: assert b'tag 5\n' == b'tag 5'
E Full diff:
E - b'tag 5'
E + b'tag 5\n'
E ? ++
.tox/py3/lib/python3.7/site-packages/swh/vault/tests/test_cookers.py:943: AssertionError
TEST RESULT
TEST RESULT
- Run At
- Jul 16 2021, 2:28 PM