Page MenuHomeSoftware Heritage

Jenkins > .tox.py3-full.lib.python3.7.site-packages.swh.model.tests.test_from_disk.TarballTest::test_contents_match
Failed

TEST RESULT

Run At
Apr 30 2021, 12:26 PM
Details
self = <swh.model.tests.test_from_disk.TarballTest testMethod=test_contents_match> def test_contents_match(self): directory = Directory.from_disk( path=os.path.join(self.tmpdir_name, b"sample-folder") ) for name, expected in self.tarball_contents.items(): obj = directory[name] if isinstance(obj, Content): self.assertContentEqual(obj, expected) elif isinstance(obj, Directory): > self.assertDirectoryEqual(obj, expected) .tox/py3-full/lib/python3.7/site-packages/swh/model/tests/test_from_disk.py:856: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <swh.model.tests.test_from_disk.TarballTest testMethod=test_contents_match> left = Directory(id=93680e5340f2f38013a6cc4539712ce44d25f837, entries=[b'link-to-another-quote', b'link-to-binary', b'some-binary', b'empty-folder', b'link-to-foo', b'foo', b'bar']) right = {'entries': [{'name': b'bar', 'perms': <DentryPerms.directory: 16384>, 'target': b'<\x1fW\x83\x94\xf4b?t\xa0\xba\x7f\x...x19e\xdc\xdc\x96F\x8c', 'type': 'file'}, ...], 'id': b'\xe8\xb0\xf1Fj\xf8`\x8c\x8a?\xb9\x87\x9d\xb1r\xb8\x87\xe8\x07Y'} def assertDirectoryEqual(self, left, right): # NoQA if not isinstance(left, Directory): raise ValueError("%s is not a Directory" % left) if isinstance(right, Directory): right = right.get_data() > assert left.entries == right["entries"] E AssertionError: assert [{'name': b'b... 'file'}, ...] == [{'name': b'b... 'file'}, ...] E At index 0 diff: {'type': 'dir', 'perms': <DentryPerms.directory: 16384>, 'target': b'\x1f5\xd2\xf2%\xf5\x99\x11e\xdd\xbf#\xe23L@>\xfd/\xd3', 'name': b'bar'} != {'name': b'bar', 'perms': <DentryPerms.directory: 16384>, 'target': b'<\x1fW\x83\x94\xf4b?t\xa0\xba\x7f\xe7ar\x9fY\xfcn\xc4', 'type': 'dir'} E Full diff: E [ E {'name': b'bar', E 'perms': <DentryPerms.directory: 16384>, E - 'target': b'<\x1fW\x83\x94\xf4b?t\xa0\xba\x7f\xe7ar\x9fY\xfcn\xc4', E + 'target': b'\x1f5\xd2\xf2%\xf5\x99\x11e\xdd\xbf#\xe23L@>\xfd/\xd3',... E E ...Full output truncated (33 lines hidden), use '-vv' to show .tox/py3-full/lib/python3.7/site-packages/swh/model/tests/test_from_disk.py:493: AssertionError