diff -r 9ab5b929408b -r 38fa6ca90253 src/eric7/Testing/Interfaces/UnittestExecutor.py --- a/src/eric7/Testing/Interfaces/UnittestExecutor.py Mon Nov 28 09:06:27 2022 +0100 +++ b/src/eric7/Testing/Interfaces/UnittestExecutor.py Tue Nov 29 13:37:46 2022 +0100 @@ -222,7 +222,12 @@ message = data.get("shortmsg", "") if not message and tracebackLines: - message = tracebackLines[-1].split(":", 1)[1].strip() + # search the line containing the assertion error + for index in range(len(tracebackLines) - 1, -1, -1): + line = tracebackLines[index].strip() + if line.startswith("AssertionError:"): + message = line.replace("AssertionError:", "").strip() + break self.testResult.emit( TestResult(