fix(pytest): handle parameterized tests without pytest discovery
Only emits position IDs with parameters when pytest discovery is enabled See #36 and #59
This commit is contained in:
@@ -17,7 +17,7 @@ class UnittestNeotestAdapter(NeotestAdapter):
|
||||
return str(Path(inspect.getmodule(case).__file__).absolute()) # type: ignore
|
||||
|
||||
def case_id_elems(self, case) -> List[str]:
|
||||
if case.__class__.__name__ == '_SubTest':
|
||||
if case.__class__.__name__ == "_SubTest":
|
||||
case = case.test_case
|
||||
file = self.case_file(case)
|
||||
elems = [file, case.__class__.__name__]
|
||||
|
Reference in New Issue
Block a user