From 7e475942d2525619c3a5113e69a49b96720ba2b8 Mon Sep 17 00:00:00 2001
From: Antoine Lambert <anlambert@softwareheritage.org>
Date: Wed, 13 Mar 2024 15:00:46 +0100
Subject: [PATCH] pytest: Fix tests execution with pytest 8.1

Remove use of --import-mode=importlib pytest option and use
new option consider_namespace_packages to fix tests execution
with latest pytest release.
---
 pytest.ini            | 2 +-
 requirements-test.txt | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/pytest.ini b/pytest.ini
index 61aeeba..fe398a0 100644
--- a/pytest.ini
+++ b/pytest.ini
@@ -1,4 +1,4 @@
 [pytest]
 norecursedirs = build docs .*
 asyncio_mode = strict
-addopts = "--import-mode=importlib"
+consider_namespace_packages = true
diff --git a/requirements-test.txt b/requirements-test.txt
index 486a066..2e569e9 100644
--- a/requirements-test.txt
+++ b/requirements-test.txt
@@ -1,5 +1,5 @@
 msgpack
-pytest
+pytest >= 8.1
 pytest-mock
 pyyaml
 swh.core[testing] >= 3.0.0
-- 
GitLab