From 8aca3353342d468bdc5eccfeed75da4d1ad0181e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B3n=C3=A1n=20Carrigan?= Date: Thu, 20 Oct 2022 08:03:18 +0100 Subject: [PATCH] fix(pytest): use rootdir instead of rootpath See #21 --- neotest_python/pytest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neotest_python/pytest.py b/neotest_python/pytest.py index e9019e0..f7cf7b6 100644 --- a/neotest_python/pytest.py +++ b/neotest_python/pytest.py @@ -44,7 +44,7 @@ class PytestNeotestAdapter(NeotestAdapter): def pytest_deselected(items: List): for report in items: file_path, *name_path = report.nodeid.split("::") - abs_path = str(Path(pytest_config.rootpath, file_path)) + abs_path = str(Path(pytest_config.rootdir, file_path)) test_name, *namespaces = reversed(name_path) valid_test_name, *params = test_name.split("[") # ] pos_id = "::".join([abs_path, *namespaces, valid_test_name]) @@ -72,7 +72,7 @@ class PytestNeotestAdapter(NeotestAdapter): ): return file_path, *name_path = report.nodeid.split("::") - abs_path = str(Path(pytest_config.rootpath, file_path)) + abs_path = str(Path(pytest_config.rootdir, file_path)) test_name, *namespaces = reversed(name_path) valid_test_name, *params = test_name.split("[") # ] pos_id = "::".join([abs_path, *namespaces, valid_test_name])