diff --git a/swh/storage/tests/conftest.py b/swh/storage/tests/conftest.py --- a/swh/storage/tests/conftest.py +++ b/swh/storage/tests/conftest.py @@ -9,6 +9,7 @@ import pytest try: + import pytest_cov import pytest_cov.embed except ImportError: pytest_cov = None @@ -35,7 +36,7 @@ # This can still be overloaded via the --hypothesis-profile option. settings.load_profile("fast") -if pytest_cov is not None: +if pytest_cov is not None and int(pytest_cov.__version__.split(".")[0]) < 4: # pytest_cov + multiprocessing can cause a segmentation fault when starting # the child process ; so we're # removing pytest-coverage's hook that runs when a child process starts.