def GetTestNames():
 test_name = options.testname
 test_path = os.path.join(_BASE_PATH, 'tests')
 files = os.listdir(test_path)
 _LOCAL = {}
 for file in files:
  if (file.startswith('test') and file.endswith('js')):
   _LOCAL[file[:(-3)]] = {'name': file[:(-3)], 'images': [], 'warnings': {}, 'alert': None}
 if options.list:
  return _LOCAL.keys()
 if test_name:
  if (not (test_name in _LOCAL.keys())):
   print 'Invalid testname provided.  Use --list for a list of all available tests.'
   exit()
  _LOCAL = {}
  _LOCAL[test_name] = {'name': test_name, 'images': [], 'warnings': {}, 'alert': None}
 global _SUMMARY
 _SUMMARY = _LOCAL
 return _LOCAL.keys()

def GetTestNames ( ) : test_name = options . testname test_path = os . path . join ( _BASE_PATH , 'tests' ) files = os . listdir ( test_path ) _LOCAL = { } for file in files : if ( file . startswith ( 'test' ) and file . endswith ( 'js' ) ) : _LOCAL [ file [ : ( - 3 ) ] ] = { 'name' : file [ : ( - 3 ) ] , 'images' : [ ] , 'warnings' : { } , 'alert' : None } if options . list : return _LOCAL . keys ( ) if test_name : if ( not ( test_name in _LOCAL . keys ( ) ) ) : print 'Invalid testname provided.  Use --list for a list of all available tests.' exit ( ) _LOCAL = { } _LOCAL [ test_name ] = { 'name' : test_name , 'images' : [ ] , 'warnings' : { } , 'alert' : None } global _SUMMARY _SUMMARY = _LOCAL return _LOCAL . keys ( )
grab the test files in the js directory and store the filenames in a test name global dict .