original_docstring: Assert two files are equal.
  
      If the extension of the provided file is recognized, the relevant
      filetype-specific function is called and a more detailed check of the
      file can be done.  If the extension is not recognized, the MD5sums of
      the two files are compared instead.
  
      Known extensions: ``.json``, ``.tif``, ``.shp``, ``.csv``, ``.txt.``,
      ``.html``
  
      Args:
          file_1_uri (string): a string URI to a file on disk.
          file_2_uru (string): a string URI to a file on disk.
  
      Raises:
          AssertionError: Raised when one of the input files does not exist,\
          when the extensions of the input files differ, or if the two files\
          are found to differ.
  
      Returns:
          Nothing.
      
docstring: Assert two files are equal.
  If the extension of the provided file is recognized, the relevant
  filetype-specific function is called and a more detailed check of the
  file can be done.  If the extension is not recognized, the MD5sums of
  the two files are compared instead.
  
  
  
  file_1_uri (string): a string URI to a file on disk.
  file_2_uru (string): a string URI to a file on disk.
  
  Raised when one of the input files does not exist,\
  when the extensions of the input files differ, or if the two files\
  are found to differ.
  
  Nothing.
docstring_tokens: Assert two files are equal . If the extension of the provided file is recognized the relevant filetype - specific function is called and a more detailed check of the file can be done . If the extension is not recognized the MD5sums of the two files are compared instead . file_1_uri ( string ) : a string URI to a file on disk . file_2_uru ( string ) : a string URI to a file on disk . Raised when one of the input files does not exist \ when the extensions of the input files differ or if the two files \ are found to differ . Nothing .
code: def assert_files(file_1_uri, file_2_uri):
      """Assert two files are equal.
  
      If the extension of the provided file is recognized, the relevant
      filetype-specific function is called and a more detailed check of the
      file can be done.  If the extension is not recognized, the MD5sums of
      the two files are compared instead.
  
      Known extensions: ``.json``, ``.tif``, ``.shp``, ``.csv``, ``.txt.``,
      ``.html``
  
      Args:
          file_1_uri (string): a string URI to a file on disk.
          file_2_uru (string): a string URI to a file on disk.
  
      Raises:
          AssertionError: Raised when one of the input files does not exist,\
          when the extensions of the input files differ, or if the two files\
          are found to differ.
  
      Returns:
          Nothing.
      """
  
      for uri in [file_1_uri, file_2_uri]:
          assert_equal(os.path.exists(uri), True,
              'File %s does not exist' % uri)
  
      # assert the extensions are the same
      file_1_ext = os.path.splitext(file_1_uri)[1]
      file_2_ext = os.path.splitext(file_2_uri)[1]
      assert_equal(file_1_ext, file_2_ext, 'Extensions differ: %s, %s' %
          (file_1_ext, file_2_ext))
  
      assert_funcs = {
          '.json': assert_json,
          '.tif': assert_rasters_equal,
          '.shp': assert_vectors_equal,
          '.csv': assert_csv_equal,
          '.txt': assert_text_equal,
          '.html': assert_text_equal,
      }
  
      try:
          assert_funcs[file_1_ext](file_1_uri, file_2_uri)
      except KeyError:
          # When we're given an extension we don't have a function for, assert
          # the MD5s.
          file_1_md5 = utils.get_hash(file_1_uri)
          file_2_md5 = utils.get_hash(file_2_uri)
          assert_equal(file_1_md5, file_2_md5,
              'Files %s and %s differ (MD5sum)' % (file_1_uri, file_2_uri))
code_tokens: def assert_files ( file_1_uri , file_2_uri ) : for uri in [ file_1_uri , file_2_uri ] : assert_equal ( os . path . exists ( uri ) , True , 'File %s does not exist' % uri ) file_1_ext = os . path . splitext ( file_1_uri ) [ 1 ] file_2_ext = os . path . splitext ( file_2_uri ) [ 1 ] assert_equal ( file_1_ext , file_2_ext , 'Extensions differ: %s, %s' % ( file_1_ext , file_2_ext ) ) assert_funcs = { '.json' : assert_json , '.tif' : assert_rasters_equal , '.shp' : assert_vectors_equal , '.csv' : assert_csv_equal , '.txt' : assert_text_equal , '.html' : assert_text_equal , } try : assert_funcs [ file_1_ext ] ( file_1_uri , file_2_uri ) except KeyError : file_1_md5 = utils . get_hash ( file_1_uri ) file_2_md5 = utils . get_hash ( file_2_uri ) assert_equal ( file_1_md5 , file_2_md5 , 'Files %s and %s differ (MD5sum)' % ( file_1_uri , file_2_uri ) )
short_docstring: Assert two files are equal.
short_docstring_tokens: Assert two files are equal .
comment: """Assert two files are equal.
  
      If the extension of the provided file is recognized, the relevant
      filetype-specific function is called and a more detailed check of the
      file can be done.  If the extension is not recognized, the MD5sums of
      the two files are compared instead.
  
      Known extensions: ``.json``, ``.tif``, ``.shp``, ``.csv``, ``.txt.``,
      ``.html``
  
      Args:
          file_1_uri (string): a string URI to a file on disk.
          file_2_uru (string): a string URI to a file on disk.
  
      Raises:
          AssertionError: Raised when one of the input files does not exist,\
          when the extensions of the input files differ, or if the two files\
          are found to differ.
  
      Returns:
          Nothing.
      """$SEP$# assert the extensions are the same$SEP$# When we're given an extension we don't have a function for, assert$SEP$# the MD5s.