Skip to content

Commit 96098b8

Browse files
committed
Changed global name from IRIS.TEMPCJG to IRIS.TEMP.TestCoveragePY
1 parent 58f1059 commit 96098b8

File tree

3 files changed

+7
-14
lines changed

3 files changed

+7
-14
lines changed

cls/TestCoverage/Data/CodeUnit.cls

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -283,16 +283,10 @@ Method UpdatePyExecutableLines(pName As %String, ByRef pPyCodeUnit) As %Status
283283
Throw ##class(%Exception.SQL).CreateFromSQLCODE(SQLCODE,%msg)
284284
}
285285
}
286-
if (pName = "TestCoverage.Utils") {
287-
set ^IRIS.TEMPCG($i(^IRIS.TEMPCG)) = tBitString
288-
set ^IRIS.TEMPCG($i(^IRIS.TEMPCG)) = ..ExecutableLines
289-
}
290286
Set ..ExecutableLines = $BITLOGIC(..ExecutableLines | tBitString)
291287
Set tSC = ..%Save()
292288
$$$ThrowOnError(tSC)
293-
if (pName = "TestCoverage.Utils") {
294-
set ^IRIS.TEMPCG($i(^IRIS.TEMPCG)) = ..ExecutableLines
295-
}
289+
296290
TCOMMIT
297291
} Catch e {
298292
Set pCodeUnit = $$$NULLOREF

cls/TestCoverage/Data/Coverage.cls

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,9 @@ ClassMethod StoreIntCoverage(pRun As %Integer, pTestPath As %String, pName As %S
100100
$$$ThrowOnError(tSC)
101101
}
102102
Else { // If pType = "PY"
103-
//^IRIS.TEMPCJG(148,1)="EP.sysSettrace", ^IRIS.TEMPCJG(148,2)="fun_generator", ^IRIS.TEMPCJG(148,3)=120
104-
if $Data(^IRIS.TEMPCJG(pName)) {
105-
for i = 1:1:(^IRIS.TEMPCJG(pName)-1) {
106-
Set tLineNumber = ^IRIS.TEMPCJG(pName, i)
103+
if $Data(^IRIS.TEMP.TestCoveragePY(pName)) {
104+
for i = 1:1:(^IRIS.TEMP.TestCoveragePY(pName)-1) {
105+
Set tLineNumber = ^IRIS.TEMP.TestCoveragePY(pName, i)
107106
Set $Bit(tCoveredLines, tLineNumber) = 1
108107
}
109108
}

cls/TestCoverage/Utils/LineByLineMonitor.cls

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,14 @@ ClassMethod PyStartWithScope(pCoverageClasses As %List) [ Language = python ]
7171
line_no = frame.f_lineno
7272
if class_name in tCoverageClasses and line_no != 1: # if this is in a covered class
7373
# print(f"A {event} encountered in {func_name}() in class {class_name} at line number {line_no}")
74-
tGlob = iris.gref('^IRIS.TEMPCJG')
74+
tGlob = iris.gref('^IRIS.TEMP.TestCoveragePY')
7575
curId = tGlob.get([class_name])
7676
if not curId:
7777
tGlob[class_name] = 1
7878
curId = 1
7979
tGlob[class_name, curId] = line_no
8080
tGlob[class_name] = curId+1
81-
#; iris.execute('set ^TestCovera3FF5.PyMonitorReC80BD($i(^TestCovera3FF5.PyMonitorReC80BD)) = $listbuild("", ^IRIS.TEMPCJG(1), ^IRIS.TEMPCJG(2),^IRIS.TEMPCJG(3) )')
81+
#; iris.execute('set ^TestCovera3FF5.PyMonitorReC80BD($i(^TestCovera3FF5.PyMonitorReC80BD)) = $listbuild("", ^IRIS.TEMP.TestCoveragePY(1), ^IRIS.TEMP.TestCoveragePY(2),^IRIS.TEMP.TestCoveragePY(3) )')
8282

8383
#; new_line = iris.cls("TestCoverage.Data.PyMonitorResults")._New()
8484
#; new_line.ClassName = class_name
@@ -101,7 +101,7 @@ ClassMethod PyStartWithScope(pCoverageClasses As %List) [ Language = python ]
101101

102102
ClassMethod PyClearCounters()
103103
{
104-
Kill ^IRIS.TEMPCJG
104+
Kill ^IRIS.TEMP.TestCoveragePY
105105
#; &sql(
106106
#; delete from TestCoverage_Data.PyMonitorResults
107107
#; )

0 commit comments

Comments
 (0)