<s> from cafe . common . reporting . json_report import JSONReport <EOL> from cafe . common . reporting . xml_report import XMLReport <EOL> from cafe . common . reporting . subunit_report import SubunitReport <EOL> class Reporter : <EOL> def __init__ ( self , result_parser , all_results ) : <EOL> self . result_parser = result_parser <EOL> self . all_results = all_results <EOL> def generate_report ( self , result_type , path = None ) : <EOL> """<STR_LIT>""" <EOL> if result_type == '<STR_LIT>' : <EOL> report = JSONReport ( ) <EOL> elif result_type == '<STR_LIT>' : <EOL> report = XMLReport ( ) <EOL> elif result_type == '<STR_LIT>' : <EOL> report = SubunitReport ( ) <EOL> report . generate_report ( <EOL> result_parser = self . result_parser , all_results = self . all_results , <EOL> path = path ) </s>
