#NEWLINE# def get_modules( modules_str ) : #NEWLINE# #INDENT# names = modules_str . split ( ',' ) #NEWLINE# modules = [ ] #NEWLINE# for name in names : #NEWLINE# #INDENT# name = name . replace ( '/' , '.' ) . replace ( '.py' , '' ) #NEWLINE# try : #NEWLINE# #INDENT# module = __import__ ( name , fromlist = 'tests' ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# ( exc_type , exc_value , exc_traceback ) = sys . exc_info ( ) #NEWLINE# print ( 'Error importing module {}:' . format ( name ) ) #NEWLINE# import traceback #NEWLINE# traceback . print_exception ( exc_type , exc_value , exc_traceback , file = sys . stdout ) #NEWLINE# #UNINDENT# modules . append ( module ) #NEWLINE# #UNINDENT# return modules