def _handle_ignores(testtag):
    """Checks if the specified test tag has attribute "ignores"; if it
    does, a <global ignore="true" /> tag is created for each variable
    name in the list.
    """
    if "ignores" in testtag.attrib:
        from xml.etree.ElementTree import Element
        for varname in re.split("[\s,]+", testtag.attrib["ignores"]):
            #For ignored variables, the order does not matter. However,
            #if the user included the caret, just remove it.
            if varname[0] == '^':
                varname = varname[1::]
            e = Element("global", {"name": varname, "ignore": "true"})
            testtag.append(e)