eric7/Unittest/Interfaces/UnittestExecutor.py

branch
unittest
changeset 9065
39405e6eba20
parent 9064
339bb8c8007d
--- a/eric7/Unittest/Interfaces/UnittestExecutor.py	Sun May 15 18:08:31 2022 +0200
+++ b/eric7/Unittest/Interfaces/UnittestExecutor.py	Mon May 16 17:22:43 2022 +0200
@@ -174,7 +174,7 @@
         
         # test result
         elif data["event"] == "result":
-            fn, ln = None, None
+            filename, lineno = None, None
             tracebackLines = []
             if "traceback" in data:
                 # get the error info
@@ -186,7 +186,8 @@
                     if fmatch:
                         break
                 if fmatch:
-                    fn, ln = fmatch.group(1, 2)
+                    filename = fmatch.group(1)
+                    lineno = int(fmatch.group(2))
                 
             if "shortmsg" in data:
                 message = data["shortmsg"]
@@ -206,8 +207,8 @@
                 duration=(
                     data["duration_ms"] if "duration_ms" in data else None
                 ),
-                filename=fn,
-                lineno=ln,
+                filename=filename,
+                lineno=lineno,
                 subtestResult=data["subtest"] if "subtest" in data else False
             ))
         

eric ide

mercurial