From dad51cf85c60fd3a64df8276517c48d802d945dd Mon Sep 17 00:00:00 2001 From: anthobio23 Date: Tue, 18 Oct 2022 12:37:01 -0500 Subject: [PATCH] line 389 change: count_relevant_tb method mismatch --- pyunitreport/HtmlTestResult.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pyunitreport/HtmlTestResult.py b/pyunitreport/HtmlTestResult.py index 277b0d3..b2b4303 100644 --- a/pyunitreport/HtmlTestResult.py +++ b/pyunitreport/HtmlTestResult.py @@ -386,7 +386,15 @@ def _exc_info_to_string(self, err, test): if exctype is test.failureException: # Skip assert*() traceback levels - length = self._count_relevant_tb_levels(tb) + #----------------- NEW CHANGED -------------------# + + try: + length = self._count_relevant_tb_levels(tb) # inconsistent instance. should override the given method + + except Exception as E: + length = self._is_relevant_tb_level(tb) + # --------------------- 0 -----------------------# + msgLines = traceback.format_exception(exctype, value, tb, length) else: msgLines = traceback.format_exception(exctype, value, tb)