Skip to content

pytest.ini: Prevent swh-storage pytest plugin loading

The fixtures contained in that plugin are currently not needed and it makes the tox build fail due to missing pytest-postgresql dep.

py3 run-test: commands[0] | pytest --hypothesis-profile=swh-web-fast --cov /home/antoine/swh/swh-environment/swh-web/.tox/py3/lib/python3.7/site-packages/swh/web --cov-branch /home/antoine/swh/swh-environment/swh-web/.tox/py3/lib/python3.7/site-packages/swh/web
Traceback (most recent call last):
  File "/home/antoine/swh/swh-environment/swh-web/.tox/py3/bin/pytest", line 8, in <module>
    sys.exit(main())
  File "/home/antoine/swh/swh-environment/swh-web/.tox/py3/lib/python3.7/site-packages/_pytest/config/__init__.py", line 105, in main
    config = _prepareconfig(args, plugins)
  File "/home/antoine/swh/swh-environment/swh-web/.tox/py3/lib/python3.7/site-packages/_pytest/config/__init__.py", line 258, in _prepareconfig
    pluginmanager=pluginmanager, args=args
  File "/home/antoine/swh/swh-environment/swh-web/.tox/py3/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/home/antoine/swh/swh-environment/swh-web/.tox/py3/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/home/antoine/swh/swh-environment/swh-web/.tox/py3/lib/python3.7/site-packages/pluggy/manager.py", line 87, in <lambda>
    firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
  File "/home/antoine/swh/swh-environment/swh-web/.tox/py3/lib/python3.7/site-packages/pluggy/callers.py", line 203, in _multicall
    gen.send(outcome)
  File "/home/antoine/swh/swh-environment/swh-web/.tox/py3/lib/python3.7/site-packages/_pytest/helpconfig.py", line 90, in pytest_cmdline_parse
    config = outcome.get_result()
  File "/home/antoine/swh/swh-environment/swh-web/.tox/py3/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/home/antoine/swh/swh-environment/swh-web/.tox/py3/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/home/antoine/swh/swh-environment/swh-web/.tox/py3/lib/python3.7/site-packages/_pytest/config/__init__.py", line 836, in pytest_cmdline_parse
    self.parse(args)
  File "/home/antoine/swh/swh-environment/swh-web/.tox/py3/lib/python3.7/site-packages/_pytest/config/__init__.py", line 1044, in parse
    self._preparse(args, addopts=addopts)
  File "/home/antoine/swh/swh-environment/swh-web/.tox/py3/lib/python3.7/site-packages/_pytest/config/__init__.py", line 992, in _preparse
    self.pluginmanager.load_setuptools_entrypoints("pytest11")
  File "/home/antoine/swh/swh-environment/swh-web/.tox/py3/lib/python3.7/site-packages/pluggy/manager.py", line 299, in load_setuptools_entrypoints
    plugin = ep.load()
  File "/home/antoine/swh/swh-environment/swh-web/.tox/py3/lib/python3.7/site-packages/importlib_metadata/__init__.py", line 105, in load
    module = import_module(match.group('module'))
  File "/home/antoine/swh/swh-environment/swh-web/.tox/py3/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "/home/antoine/swh/swh-environment/swh-web/.tox/py3/lib/python3.7/site-packages/_pytest/assertion/rewrite.py", line 152, in exec_module
    exec(co, module.__dict__)
  File "/home/antoine/swh/swh-environment/swh-web/.tox/py3/lib/python3.7/site-packages/swh/storage/pytest_plugin.py", line 15, in <module>
    from pytest_postgresql import factories
ModuleNotFoundError: No module named 'pytest_postgresql'

Migrated from D3474 (view on Phabricator)

Merge request reports