#NEWLINE# def do_check( vext_files ) : #NEWLINE# #INDENT# "\n    Attempt to import everything in the 'test-imports' section of specified\n    vext_files\n\n    :param: list of vext filenames (without paths), '*' matches all.\n    :return: True if test_imports was successful from all files\n    " #NEWLINE# import vext #NEWLINE# all_specs = set ( vext . gatekeeper . spec_files_flat ( ) ) #NEWLINE# if ( vext_files == [ '*' ] ) : #NEWLINE# #INDENT# vext_files = check_passed #NEWLINE# #UNINDENT# unknown_specs = ( set ( vext_files ) - all_specs ) #NEWLINE# for fn in unknown_specs : #NEWLINE# #INDENT# print ( ( '%s is not an installed vext file.' % fn ) , file = sys . stderr ) #NEWLINE# #UNINDENT# if unknown_specs : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# check_passed = True #NEWLINE# for fn in [ join ( vext . gatekeeper . spec_dir ( ) , fn ) for fn in vext_files ] : #NEWLINE# #INDENT# f = vext . gatekeeper . open_spec ( open ( fn ) ) #NEWLINE# modules = f . get ( 'test_import' , [ ] ) #NEWLINE# for ( success , module ) in vext . gatekeeper . test_imports ( modules ) : #NEWLINE# #INDENT# if ( not success ) : #NEWLINE# #INDENT# check_passed = False #NEWLINE# #UNINDENT# line = ( 'import %s: %s' % ( module , ( '[success]' if success else '[failed]' ) ) ) #NEWLINE# print ( line ) #NEWLINE# #UNINDENT# print ( '' ) #NEWLINE# #UNINDENT# return check_passed