swh_storage = <swh.storage.filter.FilteringProxyStorage object at 0x7fdb891eb128>
datadir = '/var/lib/jenkins/workspace/DLDHG/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/loader/mercurial/tests/data'
tmp_path = PosixPath('/tmp/pytest-of-jenkins/pytest-0/test_visit_error_with_clone_er0')
mocker = <pytest_mock.plugin.MockerFixture object at 0x7fdb891eb240>
def test_visit_error_with_clone_error(swh_storage, datadir, tmp_path, mocker):
"""Testing failures other than 'not_found'"""
mock = mocker.patch("hglib.clone")
mock.side_effect = CommandError((), 255, b"", b"out of disk space")
archive_name = "the-sandbox"
archive_path = os.path.join(datadir, f"{archive_name}.tgz")
repo_url = prepare_repository_from_archive(archive_path, archive_name, tmp_path)
> loader = HgBundle20Loader(swh_storage, repo_url)
.tox/py3/lib/python3.7/site-packages/swh/loader/mercurial/tests/test_loader.py:274:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/loader/mercurial/loader.py:142: in __init__
os.environ.update(get_minimum_env())
.tox/py3/lib/python3.7/site-packages/swh/loader/mercurial/utils.py:36: in get_minimum_env
"PATH": os.environ["PATH"],
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = environ({}), key = 'PATH'
def __getitem__(self, key):
try:
value = self._data[self.encodekey(key)]
except KeyError:
# raise KeyError with the original key value
> raise KeyError(key) from None
E KeyError: 'PATH'
/usr/lib/python3.7/os.py:678: KeyError
TEST RESULT
TEST RESULT
- Run At
- Feb 25 2021, 3:58 PM