self = <swh.model.tests.test_from_disk.TarballIterDirectory testMethod=test_iter_directory>
def test_iter_directory(self):
"""Iter from_disk.directory should yield the full arborescence tree
"""
directory = Directory.from_disk(
path=os.path.join(self.tmpdir_name, b"sample-folder")
)
> contents, skipped_contents, directories = from_disk.iter_directory(directory)
.tox/py3/lib/python3.7/site-packages/swh/model/tests/test_from_disk.py:874:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/model/from_disk.py:357: in iter_directory
obj = obj.to_model()
.tox/py3/lib/python3.7/site-packages/swh/model/from_disk.py:226: in to_model
return DiskBackedContent.from_dict(data)
.tox/py3/lib/python3.7/site-packages/swh/model/from_disk.py:58: in from_dict
return cls(**d)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = DiskBackedContent(sha1=b'\x0b\xbc\x12\xd7\xf4\xa2\xa1[\x14=\xa8F\x17\xd9\\\xb2#\xc9\xb2<', sha1_git=b'hv\x95y\xc3\xea\...c0z\x18\xc6", length=5, status=NOTHING, ctime=None, path=b'/tmp/swh.model.from_diskmpxfwcr0/sample-folder/some-binary')
sha1 = b'\x0b\xbc\x12\xd7\xf4\xa2\xa1[\x14=\xa8F\x17\xd9\\\xb2#\xc9\xb2<'
sha1_git = b'hv\x95y\xc3\xea\xad\xbeUSy\xb9\xc3S\x8ef(\xba\xe1\xeb'
sha256 = b'\xba\xc6P\xd3Jv8\xbb\n\xebSBdm$\xe3\xb9\xadkD\xc9\xb3\x83b\x1f\xaaH+\x99\n6}'
blake2s256 = b"\x92.\x0fp\x15\x03R\x12I[\t\x0c'WsW\xa7@\xdd\xd7{\x0b\x9e\x0c\xd2;T\x80\xc0z\x18\xc6"
length = 5, status = 'visible', ctime = None
path = b'/tmp/swh.model.from_diskmpxfwcr0/sample-folder/some-binary'
def __init__(self, sha1, sha1_git, sha256, blake2s256, length, status=attr_dict['status'].default, ctime=attr_dict['ctime'].default, path=attr_dict['path'].default):
_setattr = _cached_setattr.__get__(self, self.__class__)
_inst_dict = self.__dict__
_inst_dict['sha1'] = sha1
_inst_dict['sha1_git'] = sha1_git
_inst_dict['sha256'] = sha256
_inst_dict['blake2s256'] = blake2s256
_inst_dict['length'] = length
_inst_dict['status'] = status
_inst_dict['ctime'] = ctime
_inst_dict['path'] = path
if _config._run_validators is True:
__attr_validator_sha1(self, __attr_sha1, self.sha1)
__attr_validator_sha1_git(self, __attr_sha1_git, self.sha1_git)
__attr_validator_sha256(self, __attr_sha256, self.sha256)
__attr_validator_blake2s256(self, __attr_blake2s256, self.blake2s256)
__attr_validator_length(self, __attr_length, self.length)
> __attr_validator_status(self, __attr_status, self.status)
E AttributeError: status
<attrs generated init swh.model.from_disk.DiskBackedContent>:18: AttributeError
TEST RESULT
TEST RESULT
- Run At
- Dec 14 2020, 5:40 PM