original_docstring: 
      Check the contents of two folders against each other.
  
      This method iterates through the contents of each workspace folder and
      verifies that all files exist in both folders.  If this passes, then
      each file is compared against each other using
      ``GISTest.assertFiles()``.
  
      If one of these workspaces includes files that are known to be
      different between model runs (such as logs, or other files that include
      timestamps), you may wish to specify a glob pattern matching those
      filenames and passing it to `glob_exclude`.
  
      Args:
          archive_1_folder (string): a uri to a folder on disk
          archive_2_folder (string): a uri to a folder on disk
          glob_exclude (string): a string in glob format representing files to ignore
  
      Raises:
          AssertionError: Raised when the two folders are found to have\
          different contents.
  
      Returns:
          Nothing.
      
docstring: Check the contents of two folders against each other.
  This method iterates through the contents of each workspace folder and
  verifies that all files exist in both folders.  If this passes, then
  each file is compared against each other using
  ``GISTest.assertFiles()``.
  
  If one of these workspaces includes files that are known to be
  different between model runs (such as logs, or other files that include
  timestamps), you may wish to specify a glob pattern matching those
  filenames and passing it to `glob_exclude`.
  
  archive_1_folder (string): a uri to a folder on disk
  archive_2_folder (string): a uri to a folder on disk
  glob_exclude (string): a string in glob format representing files to ignore
  
  Raised when the two folders are found to have\
  different contents.
  
  Nothing.
docstring_tokens: Check the contents of two folders against each other . This method iterates through the contents of each workspace folder and verifies that all files exist in both folders . If this passes then each file is compared against each other using ` ` GISTest . assertFiles () ` ` . If one of these workspaces includes files that are known to be different between model runs ( such as logs or other files that include timestamps ) you may wish to specify a glob pattern matching those filenames and passing it to ` glob_exclude ` . archive_1_folder ( string ) : a uri to a folder on disk archive_2_folder ( string ) : a uri to a folder on disk glob_exclude ( string ) : a string in glob format representing files to ignore Raised when the two folders are found to have \ different contents . Nothing .
code: def assert_workspace(archive_1_folder, archive_2_folder,
          glob_exclude=''):
      """
      Check the contents of two folders against each other.
  
      This method iterates through the contents of each workspace folder and
      verifies that all files exist in both folders.  If this passes, then
      each file is compared against each other using
      ``GISTest.assertFiles()``.
  
      If one of these workspaces includes files that are known to be
      different between model runs (such as logs, or other files that include
      timestamps), you may wish to specify a glob pattern matching those
      filenames and passing it to `glob_exclude`.
  
      Args:
          archive_1_folder (string): a uri to a folder on disk
          archive_2_folder (string): a uri to a folder on disk
          glob_exclude (string): a string in glob format representing files to ignore
  
      Raises:
          AssertionError: Raised when the two folders are found to have\
          different contents.
  
      Returns:
          Nothing.
      """
  
      # uncompress the two archives
  
      archive_1_files = []
      archive_2_files = []
      for files_list, workspace in [
              (archive_1_files, archive_1_folder),
              (archive_2_files, archive_2_folder)]:
          for root, dirs, files in os.walk(workspace):
              root = root.replace(workspace + os.sep, '')
              ignored_files = glob.glob(glob_exclude)
              for filename in files:
                  if filename not in ignored_files:
                      full_path = os.path.join(root, filename)
                      files_list.append(full_path)
  
      archive_1_files = sorted(archive_1_files)
      archive_2_files = sorted(archive_2_files)
  
      archive_1_size = len(archive_1_files)
      archive_2_size = len(archive_2_files)
      if archive_1_size != archive_2_size:
          # find out which archive had more files.
          archive_1_files = map(lambda x: x.replace(archive_1_folder, ''),
              archive_1_files)
          archive_2_files = map(lambda x: x.replace(archive_2_folder, ''),
              archive_2_files)
          missing_from_archive_1 = list(set(archive_2_files) -
              set(archive_1_files))
          missing_from_archive_2 = list(set(archive_1_files) -
              set(archive_2_files))
          raise AssertionError('Elements missing from A:%s, from B:%s' %
              (missing_from_archive_1, missing_from_archive_2))
      else:
          # archives have the same number of files that we care about
          for file_1, file_2 in zip(archive_1_files, archive_2_files):
              file_1_uri = os.path.join(archive_1_folder, file_1)
              file_2_uri = os.path.join(archive_2_folder, file_2)
              LOGGER.debug('Checking %s, %s', file_1, file_2)
              assert_files(file_1_uri, file_2_uri)
code_tokens: def assert_workspace ( archive_1_folder , archive_2_folder , glob_exclude = '' ) : archive_1_files = [ ] archive_2_files = [ ] for files_list , workspace in [ ( archive_1_files , archive_1_folder ) , ( archive_2_files , archive_2_folder ) ] : for root , dirs , files in os . walk ( workspace ) : root = root . replace ( workspace + os . sep , '' ) ignored_files = glob . glob ( glob_exclude ) for filename in files : if filename not in ignored_files : full_path = os . path . join ( root , filename ) files_list . append ( full_path ) archive_1_files = sorted ( archive_1_files ) archive_2_files = sorted ( archive_2_files ) archive_1_size = len ( archive_1_files ) archive_2_size = len ( archive_2_files ) if archive_1_size != archive_2_size : archive_1_files = map ( lambda x : x . replace ( archive_1_folder , '' ) , archive_1_files ) archive_2_files = map ( lambda x : x . replace ( archive_2_folder , '' ) , archive_2_files ) missing_from_archive_1 = list ( set ( archive_2_files ) - set ( archive_1_files ) ) missing_from_archive_2 = list ( set ( archive_1_files ) - set ( archive_2_files ) ) raise AssertionError ( 'Elements missing from A:%s, from B:%s' % ( missing_from_archive_1 , missing_from_archive_2 ) ) else : for file_1 , file_2 in zip ( archive_1_files , archive_2_files ) : file_1_uri = os . path . join ( archive_1_folder , file_1 ) file_2_uri = os . path . join ( archive_2_folder , file_2 ) LOGGER . debug ( 'Checking %s, %s' , file_1 , file_2 ) assert_files ( file_1_uri , file_2_uri )
short_docstring: Check the contents of two folders against each other.
short_docstring_tokens: Check the contents of two folders against each other .
comment: """
      Check the contents of two folders against each other.
  
      This method iterates through the contents of each workspace folder and
      verifies that all files exist in both folders.  If this passes, then
      each file is compared against each other using
      ``GISTest.assertFiles()``.
  
      If one of these workspaces includes files that are known to be
      different between model runs (such as logs, or other files that include
      timestamps), you may wish to specify a glob pattern matching those
      filenames and passing it to `glob_exclude`.
  
      Args:
          archive_1_folder (string): a uri to a folder on disk
          archive_2_folder (string): a uri to a folder on disk
          glob_exclude (string): a string in glob format representing files to ignore
  
      Raises:
          AssertionError: Raised when the two folders are found to have\
          different contents.
  
      Returns:
          Nothing.
      """$SEP$# uncompress the two archives$SEP$# find out which archive had more files.$SEP$# archives have the same number of files that we care about