Skip to content

Commit

Permalink
test: Revert to using class name, but ignore __CNT
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonKagstrom committed Oct 29, 2023
1 parent a019c6a commit 03d47b9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/tools/parse_cobertura.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ def lookupClassName(dom, name):
tags = dom.getElementsByTagName('class')

for tag in tags:
nameAttr = tag.attributes["filename"]
if nameAttr.value == name:
nameAttr = tag.attributes["name"]
if nameAttr.value.startswith(name):
return tag

return None
Expand Down Expand Up @@ -49,6 +49,7 @@ def parseFile(filename):

def hitsPerLine(dom, fileName, lineNr):

fileName = fileName.replace(".", "_").replace("-", "_")
fileTag = lookupClassName(dom, fileName)

if fileTag != None:
Expand Down

0 comments on commit 03d47b9

Please sign in to comment.