self = <swh.model.tests.test_from_disk.FileToContent testMethod=test_special_to_content>
def test_special_to_content(self):
for filename in self.specials:
path = os.path.join(self.tmpdir_name, filename)
conv_content = Content.from_file(path=path)
> self.assertContentEqual(conv_content, self.empty_content)
.tox/py3-full/lib/python3.7/site-packages/swh/model/tests/test_from_disk.py:583:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <swh.model.tests.test_from_disk.FileToContent testMethod=test_special_to_content>
left = Content(id=da39a3ee5e6b4b0d3255bfef95601890afd80709)
right = {'blake2s256': b'i!z0y\x90\x80\x94\xe1\x11!\xd0B5J|\x1fU\xb6H,\xa1\xa5\x1e\x1b%\r\xfd\x1e\xd0\xee\xf9', 'data': b'', 'length': 0, 'perms': <DentryPerms.content: 33188>, ...}
def assertContentEqual(self, left, right, *, check_path=False): # noqa
if not isinstance(left, Content):
raise ValueError("%s is not a Content" % left)
if isinstance(right, Content):
right = right.get_data()
# Compare dictionaries
keys = DEFAULT_ALGORITHMS | {
"length",
"perms",
}
if check_path:
keys |= {"path"}
failed = []
for key in keys:
try:
lvalue = left.data[key]
if key == "perms" and "perms" not in right:
rvalue = from_disk.mode_to_perms(right["mode"])
else:
rvalue = right[key]
except KeyError:
failed.append(key)
continue
if lvalue != rvalue:
failed.append(key)
if failed:
raise self.failureException(
"Content mismatched:\n"
+ "\n".join(
"content[%s] = %r != %r" % (key, left.data.get(key), right.get(key))
> for key in failed
)
)
E AssertionError: Content mismatched:
E content[sha1_git] = b'\xda9\xa3\xee^kK\r2U\xbf\xef\x95`\x18\x90\xaf\xd8\x07\t' != b'\xe6\x9d\xe2\x9b\xb2\xd1\xd6CK\x8b)\xaewZ\xd8\xc2\xe4\x8cS\x91'
.tox/py3-full/lib/python3.7/site-packages/swh/model/tests/test_from_disk.py:483: AssertionError
TEST RESULT
TEST RESULT
- Run At
- Apr 30 2021, 12:26 PM