Page MenuHomeSoftware Heritage

Makefile.local: Fix "make test" execution
ClosedPublic

Authored by anlambert on Sep 22 2020, 2:58 PM.

Details

Summary

Without explicitely specifying the root tests folder, I get the following error when executing make test.

14:54 $ make test
python3 -m pytest  .
============================================================================================== test session starts ===============================================================================================
platform linux -- Python 3.7.3, pytest-6.0.1, py-1.9.0, pluggy-0.13.1
rootdir: /home/anlambert/swh/swh-environment/swh-core, configfile: pytest.ini
plugins: swh.core-0.2.4.dev1+g6706f7a, aiohttp-0.3.0, asyncio-0.14.0, django-3.9.0, mock-3.3.1, requests-mock-1.8.0, celery-4.4.7, hypothesis-5.33.1, flask-1.0.0, forked-1.3.0, xdist-2.1.0, dash-1.16.0, postgresql-2.4.1, swh.journal-0.4.3.dev2+g4c1a4d5.d20200917
collected 175 items / 1 error / 174 selected                                                                                                                                                                     

===================================================================================================== ERRORS =====================================================================================================
_______________________________________________________________________________ ERROR collecting swh/core/api/tests/test_async.py ________________________________________________________________________________
../../../.virtualenvs/swh/lib/python3.7/site-packages/pluggy/manager.py:127: in register
    hook._maybe_apply_history(hookimpl)
../../../.virtualenvs/swh/lib/python3.7/site-packages/pluggy/hooks.py:333: in _maybe_apply_history
    res = self._hookexec(self, [method], kwargs)
../../../.virtualenvs/swh/lib/python3.7/site-packages/pluggy/manager.py:93: in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
../../../.virtualenvs/swh/lib/python3.7/site-packages/pluggy/manager.py:87: in <lambda>
    firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
../../../.virtualenvs/swh/lib/python3.7/site-packages/aiohttp/pytest_plugin.py:36: in pytest_addoption
    help='run tests faster by disabling extra checks')
../../../.virtualenvs/swh/lib/python3.7/site-packages/_pytest/config/argparsing.py:95: in addoption
    self._anonymous.addoption(*opts, **attrs)
../../../.virtualenvs/swh/lib/python3.7/site-packages/_pytest/config/argparsing.py:354: in addoption
    raise ValueError("option names %s already added" % conflict)
E   ValueError: option names {'--aiohttp-fast'} already added
================================================================================================ warnings summary ================================================================================================
/home/anlambert/.virtualenvs/swh/lib/python3.7/site-packages/_pytest/config/__init__.py:663
  /home/anlambert/.virtualenvs/swh/lib/python3.7/site-packages/_pytest/config/__init__.py:663: PytestAssertRewriteWarning: Module already imported so cannot be rewritten: aiohttp.pytest_plugin
    self.import_plugin(import_spec)

/home/anlambert/.virtualenvs/swh/lib/python3.7/abc.py:126
  /home/anlambert/.virtualenvs/swh/lib/python3.7/abc.py:126: DeprecationWarning: Inheritance class RPCServerApp from web.Application is discouraged
    cls = super().__new__(mcls, name, bases, namespace, **kwargs)

/home/anlambert/.virtualenvs/swh/lib/python3.7/abc.py:126
  /home/anlambert/.virtualenvs/swh/lib/python3.7/abc.py:126: DeprecationWarning: Inheritance class SWHRemoteAPI from web.Application is discouraged
    cls = super().__new__(mcls, name, bases, namespace, **kwargs)

-- Docs: https://docs.pytest.org/en/stable/warnings.html
============================================================================================ short test summary info =============================================================================================
ERROR swh/core/api/tests/test_async.py - ValueError: option names {'--aiohttp-fast'} already added
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
========================================================================================== 3 warnings, 1 error in 0.24s ==========================================================================================

Diff Detail

Repository
rDCORE Foundations and core functionalities
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

This revision is now accepted and ready to land.Sep 22 2020, 2:59 PM

Add missing newline at end of file

Build is green

Patch application report for D4008 (id=14141)

Rebasing onto 08788aa378...

Current branch diff-target is up to date.
Changes applied before test
commit 7ec6321125cf46cc0d1d5c03ec45edc67391cb96
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Tue Sep 22 14:57:03 2020 +0200

    Makefile.local: Fix "make test" execution

See https://jenkins.softwareheritage.org/job/DCORE/job/tests-on-diff/78/ for more details.

Build is green

Patch application report for D4008 (id=14142)

Rebasing onto 08788aa378...

Current branch diff-target is up to date.
Changes applied before test
commit bfca0a8d63ffa546805d5ec6aed4b60029461da4
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Tue Sep 22 14:57:03 2020 +0200

    Makefile.local: Fix "make test" execution

See https://jenkins.softwareheritage.org/job/DCORE/job/tests-on-diff/79/ for more details.