Defining the pytest-plugin though the pytest-plugin [1] makes it loaded by default.
This creates loading issues on modules depending on storage but not on
the pytest plugin storage exposes. It was explained in the doc and I did not realize [2]
Instead we'll explicitely define to modules depending on the pytest plugins in
their root conftest [3]:
pytest_plugins = [ "swh.storage.pytest_plugin" ]
The following fix remains with the current other modules [4] by:
- adding their deps as swh.storage[testing] if not already.
- drop the eventual duplication introduced in tox.ini for the now apparent wrong reasons ;)
- remove the workaround to avoid loading stuff from storage where not needed (swh-web for one)
[1] https://docs.pytest.org/en/stable/writing_plugins.html#setuptools-entry-points
[2] https://docs.pytest.org/en/stable/writing_plugins.html#plugin-discovery-order-at-tool-startup
[4] as an example of adaptations D3479 (mercurial loader)
Related to T2484