You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Accounted for fact that compiled Python doesn't include empty lines at the top of a .CLS version of a Python method, added unit test for that; also fixed error handling on the Python to CLS line mapping
Copy file name to clipboardExpand all lines: cls/TestCoverage/Data/CodeUnit.cls
+14-4Lines changed: 14 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -404,17 +404,27 @@ Method UpdateSourceMap(pSourceNamespace As %String, ByRef pCache) As %Status
404
404
SettMethodStart = ..MethodMap.GetAt(tMethod)
405
405
SettMethodEnd = ..MethodEndMap.GetAt(tMethod)
406
406
SettMethodName = tMethod
407
+
408
+
// tFullMap(py/int Line Number, absolute) = $lb("CLS", class name, method name, CLS/mac start line (relative to method), CLS/mac end line (relative to method))
407
409
SettFullMap(tMethodStart) = $lb("CLS", tClass,tMethodName, -1, -1) ; -1 because the class
408
410
; definition doesn't have the +1 offset from the {
411
+
412
+
// there's a strange edge case where if the python method in the .CLS file starts with spaces, that's not captured in the Python compiled code
413
+
// so we have to find how many empty lines there are at the beginning
0 commit comments