Page MenuHomeSoftware Heritage

Jenkins > .tox.py3-full.lib.python3.7.site-packages.swh.model.tests.test_model::test_revision_check
Failed

TEST RESULT

Run At
Dec 15 2021, 6:56 PM
Details
revision = Revision(message=None, author=Person(fullname=b'', name=None, email=None), committer=Person(fullname=b'', name=None, e...0\x00\x00\x00',), id=hash_to_bytes('5ba93c9db0cff93f52b521d7420e43f6eda2784f'), extra_headers=(), raw_manifest=b'\x00') @given(strategies.revisions()) def test_revision_check(revision): revision.check() revision2 = attr.evolve(revision, id=b"\x00" * 20) with pytest.raises(ValueError, match="does not match recomputed hash"): revision2.check() revision2 = attr.evolve( revision, raw_manifest=swh.model.git_objects.revision_git_object(revision) ) with pytest.raises( ValueError, match="non-none raw_manifest attribute, but does not need it." ): > revision2.check() .tox/py3-full/lib/python3.7/site-packages/swh/model/tests/test_model.py:869: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Revision(message=None, author=Person(fullname=b'', name=None, email=None), committer=Person(fullname=b'', name=None, e...00000000000000000000000000000\nparent 0000000000000000000000000000000000000000\nauthor 0 +0000\ncommitter 0 +0000\n') def check(self) -> None: > super().check() .tox/py3-full/lib/python3.7/site-packages/swh/model/model.py:272: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Revision(message=None, author=Person(fullname=b'', name=None, email=None), committer=Person(fullname=b'', name=None, e...00000000000000000000000000000\nparent 0000000000000000000000000000000000000000\nauthor 0 +0000\ncommitter 0 +0000\n') def check(self) -> None: super().check() # type: ignore if self.id != self.compute_hash(): > raise ValueError("'id' does not match recomputed hash.") E ValueError: 'id' does not match recomputed hash. .tox/py3-full/lib/python3.7/site-packages/swh/model/model.py:239: ValueError During handling of the above exception, another exception occurred: @given(strategies.revisions()) > def test_revision_check(revision): .tox/py3-full/lib/python3.7/site-packages/swh/model/tests/test_model.py:856: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ revision = Revision(message=None, author=Person(fullname=b'', name=None, email=None), committer=Person(fullname=b'', name=None, e...0\x00\x00\x00',), id=hash_to_bytes('5ba93c9db0cff93f52b521d7420e43f6eda2784f'), extra_headers=(), raw_manifest=b'\x00') @given(strategies.revisions()) def test_revision_check(revision): revision.check() revision2 = attr.evolve(revision, id=b"\x00" * 20) with pytest.raises(ValueError, match="does not match recomputed hash"): revision2.check() revision2 = attr.evolve( revision, raw_manifest=swh.model.git_objects.revision_git_object(revision) ) with pytest.raises( ValueError, match="non-none raw_manifest attribute, but does not need it." ): > revision2.check() E AssertionError: Regex pattern 'non-none raw_manifest attribute, but does not need it.' does not match "'id' does not match recomputed hash.". .tox/py3-full/lib/python3.7/site-packages/swh/model/tests/test_model.py:869: AssertionError