def parse_test_name(test_name):
    # Try to match both name styles we know.
    mo = TESTMETH.match(test_name)
    if mo:
        qualname = mo.groupdict()["class"].split(".")
        method_name = mo.groupdict()["method"]
        module_name = ".".join(qualname[:-1])
        class_name = qualname[-1]
        return "%s:%s.%s" % (module_name, class_name, method_name)
    mo = TESTFUNC.match(test_name)
    if mo:
        qualname = mo.groupdict()["func"].split(".")
        module_name = modname(qualname)
        func_name = qualname[-1]
        return (module_name, func_name) % "%s:%s"
    # No match
    return ''
dataset/ETHPy150Open eventbrite/nose-knows/src/knows/nose_plugin.py/parse_test_name/swapped operands of `%`