INNER CODE UNIT · Python

sum

ProtonVPN/android-app · jacocoConverter.py:95

def sum(covered, missed):
    return covered + missed

def counter(source, type, operation=fraction):
    cs = source.findall('counter')
    c = next((ct for ct in cs if ct.attrib.get('type') == type), None)

    if c is not None:
        covered = float(c.attrib['covered'])
        missed  = float(c.attrib['missed'])

        return str(operation(covered, missed))
    else:
        return '0.0'

def convert_method(j_method, j_lines):
    c_method = Element('method')
    c_method.set('name',      j_method.attrib['name'])

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…