(e: Optional[BaseException])
| 4842 | seen: "set[int]" = set() |
| 4843 | |
| 4844 | def walk(e: Optional[BaseException]) -> None: |
| 4845 | if e is None or id(e) in seen: |
| 4846 | return |
| 4847 | seen.add(id(e)) |
| 4848 | tb = e.__traceback__ |
| 4849 | while tb is not None: |
| 4850 | code = tb.tb_frame.f_code |
| 4851 | if code.co_filename.startswith(pkg_root): |
| 4852 | out.append((code.co_name, dict(tb.tb_frame.f_locals))) |
| 4853 | tb = tb.tb_next |
| 4854 | walk(e.__context__) |
| 4855 | walk(e.__cause__) |
| 4856 | |
| 4857 | walk(exc) |
| 4858 | return out |
no test coverage detected