From b37ab082fb9602552fea53c6249bdbcf181e26dd Mon Sep 17 00:00:00 2001
From: Andre Anjos <andre.dos.anjos@gmail.com>
Date: Wed, 25 Jan 2023 08:36:11 +0100
Subject: [PATCH] [tests] Fix datadir location for session-scoped objects

---
 tests/conftest.py | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/tests/conftest.py b/tests/conftest.py
index e7f2e55c..f268377b 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -70,7 +70,7 @@ def temporary_basedir(tmp_path_factory):
 
 
 @pytest.fixture(scope="session")
-def montgomery_datadir(tmp_path_factory, request) -> pathlib.Path:
+def montgomery_datadir(tmp_path_factory) -> pathlib.Path:
     from ptbench.utils.rc import load_rc
 
     database_dir = load_rc().get("datadir.montgomery")
@@ -79,10 +79,7 @@ def montgomery_datadir(tmp_path_factory, request) -> pathlib.Path:
 
     # else, we must extract the LFS component
     archive = (
-        pathlib.Path(request.module.__file__).parents[0]
-        / "data"
-        / "lfs"
-        / "test-database.zip"
+        pathlib.Path(__file__).parents[0] / "data" / "lfs" / "test-database.zip"
     )
     assert archive.exists(), (
         f"Neither datadir.montgomery is set on the global configuration, "
-- 
GitLab