@@ -82,9 +82,9 @@ ClassMethod GetCurrentByName(pInternalName As %String, pSourceNamespace As %Stri
8282 $$$ThrowOnError(tSC )
8383 Set tKnownHash = tMapToResult .%GetData (1 )
8484 Set tMapToUnit = ..HashOpen (tKnownHash ,,.tSC )
85- $$$ThrowOnError(tSC )
86- $$$ThrowOnError(.. GetCurrentByName (tMapToUnit .Name _ " . " _ tMapToUnit . Type ,pSourceNamespace ,. tUpdatedUnit ,. pCache ) )
87- If (tUpdatedUnit . Hash '= tKnownHash ) {
85+ $$$ThrowOnError(tSC )
86+ do .. GetCurrentHash (tMapToUnit .Name , tMapToUnit . Type , . tUpdatedHash , , )
87+ If (tUpdatedHash '= tKnownHash ) {
8888 //Clear out old data and flag the need for an update.
8989 Set tNeedsUpdate = 1
9090 &sql (delete from TestCoverage_Data .CodeUnitMap where ToHash = :tKnownHash)
@@ -247,7 +247,6 @@ ClassMethod GetCurrentByName(pInternalName As %String, pSourceNamespace As %Stri
247247/// Fill in the LineIsPython property of .cls files
248248Method UpdatePythonLines (pName As %String , ByRef pPyCodeUnit ) As %Status
249249{
250-
251250 Set tSC = $$$OK
252251 Set tOriginalNamespace = $Namespace
253252 Set tInitTLevel = $TLevel
@@ -543,8 +542,9 @@ Method UpdateComplexity() As %Status
543542
544543 // python methods
545544 If (##class (TestCoverage.Manager ).HasPython (..Name )) {
546- do ##class (TestCoverage.Data.CodeUnit ).GetCurrentByName (..Name _ " .PY" , , .pPyCodeUnit , ) // need the source code for the python
547- set tDocumentText = pPyCodeUnit .Lines .Serialize ()
545+ do ..GetCurrentHash (..Name , " PY" , ,.tPyCodeArray , ) // need the source code for the python to pass into the method complexity calculator
546+ do ##class (TestCoverage.Utils ).CodeArrayToList (.tPyCodeArray , .tDocumentText )
547+ set tDocumentText = tDocumentText _ $listbuild (" " )
548548 set tMethodComplexities = ..GetPythonComplexities (tDocumentText )
549549 }
550550
0 commit comments