Page MenuHomeSoftware Heritage
Paste P1161

(An Untitled Masterwork)
ActivePublic

Authored by anlambert on Sep 14 2021, 3:08 PM.
(swh) ✘-2 ~/swh/swh-environment/swh-loader-mercurial [master|✔]
15:05 $ tox -r
GLOB sdist-make: /home/anlambert/swh/swh-environment/swh-loader-mercurial/setup.py
black recreate: /home/anlambert/swh/swh-environment/swh-loader-mercurial/.tox/black
black installdeps: black==19.10b0
black installed: appdirs==1.4.4,attrs==21.2.0,black==19.10b0,click==8.0.1,pathspec==0.9.0,regex==2021.8.28,toml==0.10.2,typed-ast==1.4.3
black run-test-pre: PYTHONHASHSEED='785415795'
black run-test: commands[0] | /home/anlambert/swh/swh-environment/swh-loader-mercurial/.tox/black/bin/python -m black --check swh
All done! ✨ 🍰 ✨
28 files would be left unchanged.
flake8 recreate: /home/anlambert/swh/swh-environment/swh-loader-mercurial/.tox/flake8
flake8 installdeps: flake8
flake8 installed: flake8==3.9.2,mccabe==0.6.1,pycodestyle==2.7.0,pyflakes==2.3.1
flake8 run-test-pre: PYTHONHASHSEED='785415795'
flake8 run-test: commands[0] | /home/anlambert/swh/swh-environment/swh-loader-mercurial/.tox/flake8/bin/python -m flake8
mypy recreate: /home/anlambert/swh/swh-environment/swh-loader-mercurial/.tox/mypy
mypy installdeps: mypy
mypy inst: /home/anlambert/swh/swh-environment/swh-loader-mercurial/.tox/.tmp/package/1/swh.loader.mercurial-2.1.0.zip
mypy installed: aiohttp==3.7.4.post0,aiohttp-utils==3.1.1,amqp==5.0.6,async-timeout==3.0.1,attrs==21.2.0,attrs-strict==0.2.2,beautifulsoup4==4.10.0,billiard==3.6.4.0,blinker==1.4,cassandra-driver==3.25.0,celery==5.1.2,certifi==2021.5.30,cffi==1.14.6,chardet==4.0.0,charset-normalizer==2.0.4,click==7.1.2,click-didyoumean==0.0.3,click-plugins==1.1.1,click-repl==0.2.0,confluent-kafka==1.7.0,cryptography==3.4.8,Deprecated==1.2.13,distro==1.6.0,dulwich==0.20.25,elasticsearch==7.14.1,execnet==1.9.0,Flask==2.0.1,geomet==0.2.1.post1,gunicorn==20.1.0,httplib2==0.19.1,humanize==3.11.0,hypothesis==6.21.1,idna==3.2,importlib-metadata==4.8.1,iniconfig==1.1.1,iso8601==0.1.16,itsdangerous==2.0.1,jeepney==0.7.1,Jinja2==3.0.1,keyring==23.2.1,kombu==5.1.0,launchpadlib==1.10.14,lazr.restfulclient==0.14.4,lazr.uri==1.0.6,MarkupSafe==2.0.1,mercurial==5.9.1,mirakuru==2.4.1,msgpack==1.0.2,multidict==5.1.0,mypy==0.910,mypy-extensions==0.4.3,oauthlib==3.1.1,packaging==21.0,patool==1.12,pbr==5.6.0,pika==1.2.0,pkginfo==1.7.1,plotille==3.8.0,pluggy==1.0.0,port-for==0.6.1,prompt-toolkit==3.0.20,psutil==5.8.0,psycopg2==2.9.1,py==1.10.0,pycparser==2.20,pyparsing==2.4.7,pytest==6.2.5,pytest-forked==1.3.0,pytest-mock==3.6.1,pytest-postgresql==3.1.1,pytest-xdist==2.3.0,python-dateutil==2.8.2,python-debian==0.1.40,python-hglib==2.6.2,python-mimeparse==1.6.0,pytz==2021.1,PyYAML==5.4.1,requests==2.26.0,SecretStorage==3.3.1,sentry-sdk==1.3.1,simpy==3.0.13,six==1.16.0,sortedcontainers==2.4.0,soupsieve==2.2.1,sqlitedict==1.7.0,swh.core==0.14.5,swh.journal==0.8.0,swh.lister==1.5.0,swh.loader.core==0.23.2,swh.loader.mercurial @ file:///home/anlambert/swh/swh-environment/swh-loader-mercurial/.tox/.tmp/package/1/swh.loader.mercurial-2.1.0.zip,swh.model==2.8.0,swh.objstorage==0.2.3,swh.scheduler==0.18.0,swh.storage==0.36.0,tenacity==8.0.1,testresources==2.0.1,toml==0.10.2,types-click==7.1.5,types-Deprecated==1.2.1,types-Flask==1.1.3,types-Jinja2==2.11.6,types-MarkupSafe==1.1.6,types-python-dateutil==2.8.0,types-pytz==2021.1.2,types-PyYAML==5.4.10,types-requests==2.25.6,types-Werkzeug==1.0.5,typing-extensions==3.10.0.2,urllib3==1.26.6,vine==5.0.0,wadllib==1.3.6,wcwidth==0.2.5,Werkzeug==2.0.1,wrapt==1.12.1,yarl==1.6.3,zipp==3.5.0
mypy run-test-pre: PYTHONHASHSEED='785415795'
mypy run-test: commands[0] | mypy swh
Success: no issues found in 28 source files
py3 recreate: /home/anlambert/swh/swh-environment/swh-loader-mercurial/.tox/py3
py3 installdeps: pytest-cov, swh.scheduler[testing], swh.storage[testing]
py3 inst: /home/anlambert/swh/swh-environment/swh-loader-mercurial/.tox/.tmp/package/1/swh.loader.mercurial-2.1.0.zip
py3 installed: aiohttp==3.7.4.post0,aiohttp-utils==3.1.1,amqp==5.0.6,async-timeout==3.0.1,attrs==21.2.0,attrs-strict==0.2.2,beautifulsoup4==4.10.0,billiard==3.6.4.0,blinker==1.4,cassandra-driver==3.25.0,celery==5.1.2,certifi==2021.5.30,cffi==1.14.6,chardet==4.0.0,charset-normalizer==2.0.4,click==7.1.2,click-didyoumean==0.0.3,click-plugins==1.1.1,click-repl==0.2.0,confluent-kafka==1.7.0,coverage==5.5,cryptography==3.4.8,Deprecated==1.2.13,distro==1.6.0,dulwich==0.20.25,elasticsearch==7.14.1,execnet==1.9.0,Flask==2.0.1,geomet==0.2.1.post1,gunicorn==20.1.0,httplib2==0.19.1,humanize==3.11.0,hypothesis==6.21.1,idna==3.2,importlib-metadata==4.8.1,iniconfig==1.1.1,iso8601==0.1.16,itsdangerous==2.0.1,jeepney==0.7.1,Jinja2==3.0.1,keyring==23.2.1,kombu==5.1.0,launchpadlib==1.10.14,lazr.restfulclient==0.14.4,lazr.uri==1.0.6,MarkupSafe==2.0.1,mercurial==5.9.1,mirakuru==2.4.1,msgpack==1.0.2,multidict==5.1.0,mypy-extensions==0.4.3,oauthlib==3.1.1,packaging==21.0,patool==1.12,pbr==5.6.0,pika==1.2.0,pkginfo==1.7.1,plotille==3.8.0,pluggy==1.0.0,port-for==0.6.1,prompt-toolkit==3.0.20,psutil==5.8.0,psycopg2==2.9.1,py==1.10.0,pycparser==2.20,pyparsing==2.4.7,pytest==6.2.5,pytest-cov==2.12.1,pytest-forked==1.3.0,pytest-mock==3.6.1,pytest-postgresql==3.1.1,pytest-xdist==2.3.0,python-dateutil==2.8.2,python-debian==0.1.40,python-hglib==2.6.2,python-mimeparse==1.6.0,pytz==2021.1,PyYAML==5.4.1,requests==2.26.0,SecretStorage==3.3.1,sentry-sdk==1.3.1,simpy==3.0.13,six==1.16.0,sortedcontainers==2.4.0,soupsieve==2.2.1,sqlitedict==1.7.0,swh.core==0.14.5,swh.journal==0.8.0,swh.lister==1.5.0,swh.loader.core==0.23.2,swh.loader.mercurial @ file:///home/anlambert/swh/swh-environment/swh-loader-mercurial/.tox/.tmp/package/1/swh.loader.mercurial-2.1.0.zip,swh.model==2.8.0,swh.objstorage==0.2.3,swh.scheduler==0.18.0,swh.storage==0.36.0,tenacity==8.0.1,testresources==2.0.1,toml==0.10.2,types-click==7.1.5,types-Deprecated==1.2.1,types-Flask==1.1.3,types-Jinja2==2.11.6,types-MarkupSafe==1.1.6,types-python-dateutil==2.8.0,types-pytz==2021.1.2,types-PyYAML==5.4.10,types-requests==2.25.6,types-Werkzeug==1.0.5,typing-extensions==3.10.0.2,urllib3==1.26.6,vine==5.0.0,wadllib==1.3.6,wcwidth==0.2.5,Werkzeug==2.0.1,wrapt==1.12.1,yarl==1.6.3,zipp==3.5.0
py3 run-test-pre: PYTHONHASHSEED='785415795'
py3 run-test: commands[0] | pytest --cov=/home/anlambert/swh/swh-environment/swh-loader-mercurial/.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial /home/anlambert/swh/swh-environment/swh-loader-mercurial/.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial --cov-branch
================================================================================================================================== test session starts ==================================================================================================================================
platform linux -- Python 3.9.2, pytest-6.2.5, py-1.10.0, pluggy-1.0.0
cachedir: .tox/py3/.pytest_cache
rootdir: /home/anlambert/swh/swh-environment/swh-loader-mercurial, configfile: pytest.ini
plugins: postgresql-3.1.1, mock-3.6.1, hypothesis-6.21.1, swh.core-0.14.5, swh.journal-0.8.0, forked-1.3.0, cov-2.12.1, xdist-2.3.0
collected 56 items
.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/tests/test_converters.py ........ [ 14%]
.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/tests/test_from_disk.py ..............F...... [ 51%]
.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/tests/test_hgutil.py .. [ 55%]
.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/tests/test_identify.py ... [ 60%]
.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/tests/test_loader.py FF.F.....F... [ 83%]
.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/tests/test_tasks.py .. [ 87%]
.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/tests/test_tasks_from_disk.py .. [ 91%]
.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/tests/test_utils.py ..... [100%]
======================================================================================================================================= FAILURES ========================================================================================================================================
______________________________________________________________________________________________________________________________ test_old_loader_new_loader _______________________________________________________________________________________________________________________________
swh_storage = <swh.storage.proxies.filter.FilteringProxyStorage object at 0x7f717f507820>, datadir = '/home/anlambert/swh/swh-environment/swh-loader-mercurial/.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/tests/data'
tmp_path = PosixPath('/tmp/pytest-of-anlambert/pytest-25/test_old_loader_new_loader0')
def test_old_loader_new_loader(swh_storage, datadir, tmp_path):
archive_name = "example"
archive_path = os.path.join(datadir, f"{archive_name}.tgz")
repo_url = prepare_repository_from_archive(archive_path, archive_name, tmp_path)
repo_path = repo_url.replace("file://", "")
old_loader = HgBundle20Loader(swh_storage, repo_path)
> assert old_loader.load() == {"status": "eventful"}
E AssertionError: assert {'status': 'failed'} == {'status': 'eventful'}
E Differing items:
E {'status': 'failed'} != {'status': 'eventful'}
E Use -v to get the full diff
.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/tests/test_from_disk.py:429: AssertionError
----------------------------------------------------------------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------------------------------------------------------------
ERROR swh.loader.mercurial.Bundle20Loader:loader.py:362 Loading failure, updating to `failed` status
Traceback (most recent call last):
File "/home/anlambert/swh/swh-environment/swh-loader-mercurial/.tox/py3/lib/python3.9/site-packages/swh/loader/core/loader.py", line 335, in load
self.prepare()
File "/home/anlambert/swh/swh-environment/swh-loader-mercurial/.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/loader.py", line 282, in prepare
self.clone_with_timeout(
File "/home/anlambert/swh/swh-environment/swh-loader-mercurial/.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/loader.py", line 236, in clone_with_timeout
raise result from None
FileNotFoundError: [Errno 2] No such file or directory: 'hg'
__________________________________________________________________________________________________________________________ test_loader_hg_new_visit_no_release __________________________________________________________________________________________________________________________
swh_storage = <swh.storage.proxies.filter.FilteringProxyStorage object at 0x7f717e1275b0>, datadir = '/home/anlambert/swh/swh-environment/swh-loader-mercurial/.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/tests/data'
tmp_path = PosixPath('/tmp/pytest-of-anlambert/pytest-25/test_loader_hg_new_visit_no_re1')
def test_loader_hg_new_visit_no_release(swh_storage, datadir, tmp_path):
"""Eventful visit should yield 1 snapshot"""
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)
> assert loader.load() == {"status": "eventful"}
E AssertionError: assert {'status': 'failed'} == {'status': 'eventful'}
E Differing items:
E {'status': 'failed'} != {'status': 'eventful'}
E Use -v to get the full diff
.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/tests/test_loader.py:41: AssertionError
----------------------------------------------------------------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------------------------------------------------------------
ERROR swh.loader.mercurial.Bundle20Loader:loader.py:362 Loading failure, updating to `failed` status
Traceback (most recent call last):
File "/home/anlambert/swh/swh-environment/swh-loader-mercurial/.tox/py3/lib/python3.9/site-packages/swh/loader/core/loader.py", line 335, in load
self.prepare()
File "/home/anlambert/swh/swh-environment/swh-loader-mercurial/.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/loader.py", line 282, in prepare
self.clone_with_timeout(
File "/home/anlambert/swh/swh-environment/swh-loader-mercurial/.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/loader.py", line 236, in clone_with_timeout
raise result from None
FileNotFoundError: [Errno 2] No such file or directory: 'hg'
_________________________________________________________________________________________________________________________ test_loader_hg_new_visit_with_release _________________________________________________________________________________________________________________________
swh_storage = <swh.storage.proxies.filter.FilteringProxyStorage object at 0x7f717e0fffa0>, datadir = '/home/anlambert/swh/swh-environment/swh-loader-mercurial/.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/tests/data'
tmp_path = PosixPath('/tmp/pytest-of-anlambert/pytest-25/test_loader_hg_new_visit_with_1')
def test_loader_hg_new_visit_with_release(swh_storage, datadir, tmp_path):
"""Eventful visit with release should yield 1 snapshot"""
archive_name = "hello"
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, url=repo_url, visit_date=VISIT_DATE,)
actual_load_status = loader.load()
> assert actual_load_status == {"status": "eventful"}
E AssertionError: assert {'status': 'failed'} == {'status': 'eventful'}
E Differing items:
E {'status': 'failed'} != {'status': 'eventful'}
E Use -v to get the full diff
.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/tests/test_loader.py:110: AssertionError
----------------------------------------------------------------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------------------------------------------------------------
ERROR swh.loader.mercurial.Bundle20Loader:loader.py:362 Loading failure, updating to `failed` status
Traceback (most recent call last):
File "/home/anlambert/swh/swh-environment/swh-loader-mercurial/.tox/py3/lib/python3.9/site-packages/swh/loader/core/loader.py", line 335, in load
self.prepare()
File "/home/anlambert/swh/swh-environment/swh-loader-mercurial/.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/loader.py", line 282, in prepare
self.clone_with_timeout(
File "/home/anlambert/swh/swh-environment/swh-loader-mercurial/.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/loader.py", line 236, in clone_with_timeout
raise result from None
FileNotFoundError: [Errno 2] No such file or directory: 'hg'
________________________________________________________________________________________________________________________ test_visit_error_with_snapshot_partial _________________________________________________________________________________________________________________________
swh_storage = <swh.storage.proxies.filter.FilteringProxyStorage object at 0x7f717dfb5100>, datadir = '/home/anlambert/swh/swh-environment/swh-loader-mercurial/.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/tests/data'
tmp_path = PosixPath('/tmp/pytest-of-anlambert/pytest-25/test_visit_error_with_snapshot0'), mocker = <pytest_mock.plugin.MockerFixture object at 0x7f717f6fb550>
def test_visit_error_with_snapshot_partial(swh_storage, datadir, tmp_path, mocker):
"""Incomplete ingestion leads to a 'partial' ingestion status"""
mock = mocker.patch("swh.loader.mercurial.loader.HgBundle20Loader.store_metadata")
mock.side_effect = ValueError
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)
assert loader.load() == {"status": "failed"}
> assert_last_visit_matches(
swh_storage,
repo_url,
status="partial",
type="hg",
snapshot=hash_to_bytes("3b8fe58e467deb7597b12a5fd3b2c096b8c02028"),
)
.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/tests/test_loader.py:223:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
storage = <swh.storage.proxies.filter.FilteringProxyStorage object at 0x7f717dfb5100>, url = 'file:///tmp/pytest-of-anlambert/pytest-25/test_visit_error_with_snapshot0/the-sandbox', status = 'partial', type = 'hg'
snapshot = b';\x8f\xe5\x8eF}\xebu\x97\xb1*_\xd3\xb2\xc0\x96\xb8\xc0 ('
def assert_last_visit_matches(
storage,
url: str,
status: str,
type: Optional[str] = None,
snapshot: Optional[bytes] = None,
) -> OriginVisitStatus:
"""This retrieves the last visit and visit_status which are expected to exist.
This also checks that the {visit|visit_status} have their respective properties
correctly set.
This returns the last visit_status for that given origin.
Args:
url: Origin url
status: Check that the visit status has the given status
type: Check that the returned visit has the given type
snapshot: Check that the visit status points to the given snapshot
Raises:
AssertionError in case visit or visit status is not found, or any of the type,
status and snapshot mismatch
Returns:
the visit status for further check during the remaining part of the test.
"""
visit_status = origin_get_latest_visit_status(storage, url)
assert visit_status is not None, f"Origin {url} has no visits"
if type:
assert (
visit_status.type == type
), f"Visit has type {visit_status.type} instead of {type}"
> assert (
visit_status.status == status
), f"Visit_status has status {visit_status.status} instead of {status}"
E AssertionError: Visit_status has status failed instead of partial
E assert 'failed' == 'partial'
E - partial
E + failed
.tox/py3/lib/python3.9/site-packages/swh/loader/tests/__init__.py:53: AssertionError
----------------------------------------------------------------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------------------------------------------------------------
ERROR swh.loader.mercurial.Bundle20Loader:loader.py:362 Loading failure, updating to `failed` status
Traceback (most recent call last):
File "/home/anlambert/swh/swh-environment/swh-loader-mercurial/.tox/py3/lib/python3.9/site-packages/swh/loader/core/loader.py", line 335, in load
self.prepare()
File "/home/anlambert/swh/swh-environment/swh-loader-mercurial/.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/loader.py", line 282, in prepare
self.clone_with_timeout(
File "/home/anlambert/swh/swh-environment/swh-loader-mercurial/.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/loader.py", line 236, in clone_with_timeout
raise result from None
FileNotFoundError: [Errno 2] No such file or directory: 'hg'
___________________________________________________________________________________________________________________ test_visit_repository_with_transplant_operations ____________________________________________________________________________________________________________________
swh_storage = <swh.storage.proxies.filter.FilteringProxyStorage object at 0x7f717e00c4c0>, datadir = '/home/anlambert/swh/swh-environment/swh-loader-mercurial/.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/tests/data'
tmp_path = PosixPath('/tmp/pytest-of-anlambert/pytest-25/test_visit_repository_with_tra1')
def test_visit_repository_with_transplant_operations(swh_storage, datadir, tmp_path):
"""Visit a mercurial repository visit transplant operations within should yield a
snapshot as well.
"""
archive_name = "transplant"
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, url=repo_url, visit_date=VISIT_DATE,)
# load hg repository
actual_load_status = loader.load()
> assert actual_load_status == {"status": "eventful"}
E AssertionError: assert {'status': 'failed'} == {'status': 'eventful'}
E Differing items:
E {'status': 'failed'} != {'status': 'eventful'}
E Use -v to get the full diff
.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/tests/test_loader.py:293: AssertionError
----------------------------------------------------------------------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------------------------------------------------------------------
ERROR swh.loader.mercurial.Bundle20Loader:loader.py:362 Loading failure, updating to `failed` status
Traceback (most recent call last):
File "/home/anlambert/swh/swh-environment/swh-loader-mercurial/.tox/py3/lib/python3.9/site-packages/swh/loader/core/loader.py", line 335, in load
self.prepare()
File "/home/anlambert/swh/swh-environment/swh-loader-mercurial/.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/loader.py", line 282, in prepare
self.clone_with_timeout(
File "/home/anlambert/swh/swh-environment/swh-loader-mercurial/.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/loader.py", line 236, in clone_with_timeout
raise result from None
FileNotFoundError: [Errno 2] No such file or directory: 'hg'
=================================================================================================================================== warnings summary ====================================================================================================================================
.tox/py3/lib/python3.9/site-packages/mercurial/utils/resourceutil.py:12
/home/anlambert/swh/swh-environment/swh-loader-mercurial/.tox/py3/lib/python3.9/site-packages/mercurial/utils/resourceutil.py:12: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
-- Docs: https://docs.pytest.org/en/stable/warnings.html
----------- coverage: platform linux, python 3.9.2-final-0 -----------
Name Stmts Miss Branch BrPart Cover
---------------------------------------------------------------------------------------------------------------------------
.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/__init__.py 7 0 0 0 100%
.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/archive_extract.py 24 16 8 1 28%
.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/bundle20_reader.py 199 167 62 0 12%
.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/chunked_reader.py 37 28 6 0 21%
.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/cli.py 27 27 6 0 0%
.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/converters.py 21 1 6 1 93%
.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/from_disk.py 298 30 96 5 91%
.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/hgutil.py 90 4 32 2 93%
.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/identify.py 224 15 72 10 89%
.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/loader.py 340 198 114 3 34%
.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/objects.py 168 125 68 0 18%
.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/tasks.py 12 0 0 0 100%
.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/tasks_from_disk.py 12 0 0 0 100%
.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/tests/__init__.py 0 0 0 0 100%
.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/tests/conftest.py 14 0 0 0 100%
.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/tests/loader_checker.py 28 0 6 0 100%
.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/tests/test_converters.py 26 0 0 0 100%
.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/tests/test_from_disk.py 265 11 28 0 96%
.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/tests/test_hgutil.py 33 2 2 0 89%
.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/tests/test_identify.py 33 0 0 0 100%
.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/tests/test_loader.py 155 56 12 0 60%
.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/tests/test_tasks.py 18 0 0 0 100%
.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/tests/test_tasks_from_disk.py 18 0 0 0 100%
.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/tests/test_utils.py 14 0 0 0 100%
.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/utils.py 20 0 10 0 100%
---------------------------------------------------------------------------------------------------------------------------
TOTAL 2083 680 528 22 63%
================================================================================================================================ short test summary info ================================================================================================================================
FAILED .tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/tests/test_from_disk.py::test_old_loader_new_loader - AssertionError: assert {'status': 'failed'} == {'status': 'eventful'}
FAILED .tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/tests/test_loader.py::test_loader_hg_new_visit_no_release - AssertionError: assert {'status': 'failed'} == {'status': 'eventful'}
FAILED .tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/tests/test_loader.py::test_loader_hg_new_visit_with_release - AssertionError: assert {'status': 'failed'} == {'status': 'eventful'}
FAILED .tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/tests/test_loader.py::test_visit_error_with_snapshot_partial - AssertionError: Visit_status has status failed instead of partial
FAILED .tox/py3/lib/python3.9/site-packages/swh/loader/mercurial/tests/test_loader.py::test_visit_repository_with_transplant_operations - AssertionError: assert {'status': 'failed'} == {'status': 'eventful'}
======================================================================================================================= 5 failed, 51 passed, 1 warning in 21.26s ========================================================================================================================
ERROR: InvocationError for command /home/anlambert/swh/swh-environment/swh-loader-mercurial/.tox/py3/bin/pytest --cov=/home/anlambert/swh/swh-environment/swh-loader-mercurial/.tox/py3/lib/python3.9/site-packages/swh/loader/mercurial .tox/py3/lib/python3.9/site-packages/swh/loader/mercurial --cov-branch (exited with code 1)
________________________________________________________________________________________________________________________________________ summary ________________________________________________________________________________________________________________________________________
black: commands succeeded
flake8: commands succeeded
mypy: commands succeeded
ERROR: py3: commands failed