#!/usr/bin/env python3
""" list JUnit failures """

from glob import glob
import sys
from junitparser import JUnitXml, Error, Failure

for file in glob(sys.argv[1]):
    for case in JUnitXml.fromfile(file):
        try:
            if isinstance(case.result[0], (Error, Failure)):
                print(f"{case.classname}:{case.name}")
        except IndexError:
            pass
