diff --git a/pytest.ini b/pytest.ini
index 2de77d0c229b64ba05882299b7e3e7ee4f98405e..657a529ff1a26c2ed135ed95c52e43f8e2c44c97 100644
--- a/pytest.ini
+++ b/pytest.ini
@@ -3,6 +3,6 @@ addopts =
   # we need this to avoid conflicts between the autoloaded fixture,
   # and the manually loaded one.
   -p no:pytest_swh_scheduler
-  --import-mode=importlib
 norecursedirs = build docs .*
 asyncio_mode = strict
+consider_namespace_packages = true
diff --git a/requirements-test.txt b/requirements-test.txt
index b7275cdb26e6b092159c4f183eb3b968a6c7bdc7..442fd85e1d501e60c6e65b89e4561998bfb76633 100644
--- a/requirements-test.txt
+++ b/requirements-test.txt
@@ -1,5 +1,5 @@
 pandas
-pytest
+pytest >= 8.1
 pytest-mock
 requests_mock
 swh-scheduler[testing]