@@ -82,9 +82,9 @@ ClassMethod GetCurrentByName(pInternalName As %String, pSourceNamespace As %Stri
82
82
$$$ThrowOnError(tSC )
83
83
Set tKnownHash = tMapToResult .%GetData (1 )
84
84
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 ) {
88
88
//Clear out old data and flag the need for an update.
89
89
Set tNeedsUpdate = 1
90
90
&sql (delete from TestCoverage_Data .CodeUnitMap where ToHash = :tKnownHash)
@@ -247,7 +247,6 @@ ClassMethod GetCurrentByName(pInternalName As %String, pSourceNamespace As %Stri
247
247
/// Fill in the LineIsPython property of .cls files
248
248
Method UpdatePythonLines (pName As %String , ByRef pPyCodeUnit ) As %Status
249
249
{
250
-
251
250
Set tSC = $$$OK
252
251
Set tOriginalNamespace = $Namespace
253
252
Set tInitTLevel = $TLevel
@@ -543,8 +542,9 @@ Method UpdateComplexity() As %Status
543
542
544
543
// python methods
545
544
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 (" " )
548
548
set tMethodComplexities = ..GetPythonComplexities (tDocumentText )
549
549
}
550
550
0 commit comments