code: def main():
      
  
      # set search path so that test scripts find the test modules (and no other ones)
      os.environ['PYTHONPATH'] = TESTPATH
      os.environ['MICROPYPATH'] = TESTPATH
  
      files = readfiles()
      results = run_tests(files)
      gen_rst(results)
docs: Main function