diff --git a/pytest.ini b/pytest.ini
index cb6b92bed5d50e603715f0ee6102114423ecf047..8d2cc346ba00ed5d5d7d94f42dd436e45780edcf 100644
--- a/pytest.ini
+++ b/pytest.ini
@@ -1,7 +1,9 @@
 [pytest]
-# We need this to avoid conflicts between the autoloaded fixture, and the
-# manually loaded one.
-addopts = -p no:pytest_swh_scheduler
+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
diff --git a/tox.ini b/tox.ini
index 0df11b7651e7ae5faaaab1e0e7b25f3408d0e4cb..46e9cb562462faa8cf7e7b4af4277a37b9b9aeda 100644
--- a/tox.ini
+++ b/tox.ini
@@ -13,7 +13,6 @@ deps =
   pytest-cov
 commands =
   pytest --doctest-modules \
-         --import-mode importlib \
          --rootdir {envsitepackagesdir} \
          --cov={envsitepackagesdir}/swh/lister \
          --cov-branch \