diff --git a/conftest.py b/conftest.py index 8b6908f..4ae9247 100644 --- a/conftest.py +++ b/conftest.py @@ -1,20 +1,25 @@ from hypothesis import settings import pytest from swh.core.cli import swh as _swhmain # define tests profile. Full documentation is at: # https://hypothesis.readthedocs.io/en/latest/settings.html#settings-profiles settings.register_profile("fast", max_examples=5, deadline=5000) settings.register_profile("slow", max_examples=20, deadline=5000) @pytest.fixture def swhmain(): """Yield an instance of the main `swh` click command that cleans the added subcommands up on teardown.""" commands = _swhmain.commands.copy() aliases = _swhmain.aliases.copy() yield _swhmain _swhmain.commands = commands _swhmain.aliases = aliases + + +# This is coming from the aiohttp library directly. Beware the desynchronized +# https://github.com/aio-libs/pytest-aiohttp module which wraps that library... +pytest_plugins = ["aiohttp.pytest_plugin"] diff --git a/swh/core/api/tests/conftest.py b/swh/core/api/tests/conftest.py index b7566b6..e69de29 100644 --- a/swh/core/api/tests/conftest.py +++ b/swh/core/api/tests/conftest.py @@ -1,3 +0,0 @@ -# This is coming from the aiohttp library directly. Beware the desynchronized -# https://github.com/aio-libs/pytest-aiohttp module which wraps that library... -pytest_plugins = ["aiohttp.pytest_plugin"]