@@ -44,7 +44,7 @@ class PytestNeotestAdapter(NeotestAdapter):
|
|||||||
def pytest_deselected(items: List):
|
def pytest_deselected(items: List):
|
||||||
for report in items:
|
for report in items:
|
||||||
file_path, *name_path = report.nodeid.split("::")
|
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)
|
test_name, *namespaces = reversed(name_path)
|
||||||
valid_test_name, *params = test_name.split("[") # ]
|
valid_test_name, *params = test_name.split("[") # ]
|
||||||
pos_id = "::".join([abs_path, *namespaces, valid_test_name])
|
pos_id = "::".join([abs_path, *namespaces, valid_test_name])
|
||||||
@@ -72,7 +72,7 @@ class PytestNeotestAdapter(NeotestAdapter):
|
|||||||
):
|
):
|
||||||
return
|
return
|
||||||
file_path, *name_path = report.nodeid.split("::")
|
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)
|
test_name, *namespaces = reversed(name_path)
|
||||||
valid_test_name, *params = test_name.split("[") # ]
|
valid_test_name, *params = test_name.split("[") # ]
|
||||||
pos_id = "::".join([abs_path, *namespaces, valid_test_name])
|
pos_id = "::".join([abs_path, *namespaces, valid_test_name])
|
||||||
|
Reference in New Issue
Block a user