Skip to content

Commit

Permalink
fix(unittest): parse failing subtests (#53)
Browse files Browse the repository at this point in the history
Co-authored-by: Willem Jan Noort <noortw01@heiway.net>
  • Loading branch information
Willem-J-an and Willem Jan Noort committed Aug 25, 2023
1 parent 054f221 commit 81d2265
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions neotest_python/unittest.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ def case_file(self, case) -> str:
return str(Path(inspect.getmodule(case).__file__).absolute()) # type: ignore

def case_id_elems(self, case) -> List[str]:
if case.__class__.__name__ == '_SubTest':
case = case.test_case
file = self.case_file(case)
elems = [file, case.__class__.__name__]
if isinstance(case, TestCase):
Expand Down

0 comments on commit 81d2265

Please sign in to comment.