self = <swh.model.tests.test_from_disk.DirectoryToObjects testMethod=test_directory_to_objects_ignore_name_case>
def test_directory_to_objects_ignore_name_case(self):
directory = Directory.from_disk(
path=self.tmpdir_name,
dir_filter=from_disk.ignore_named_directories([b'symLiNks'],
case_sensitive=False)
)
for name, value in self.contents.items():
> self.assertContentEqual(directory[b'contents/' + name], value)
.tox/py3/lib/python3.7/site-packages/swh/model/tests/test_from_disk.py:826:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/model/from_disk.py:372: in __getitem__
return self.__getitem__(key1)[key2]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = Directory(id=4b825dc642cb6eb9a060e54bf8d69288fbee4904, entries=[])
key = b'contents'
def __getitem__(self, key):
if not isinstance(key, bytes):
raise ValueError('Can only get a bytes from Directory')
# Convenience shortcut
if key == b'':
return self
if b'/' not in key:
> return super().__getitem__(key)
E KeyError: b'contents'
.tox/py3/lib/python3.7/site-packages/swh/model/from_disk.py:369: KeyError
TEST RESULT
TEST RESULT
- Run At
- Apr 8 2020, 9:48 AM