tools/code_coverage/coverage_test.py
def verify_directory_view(self, filepath):
    """Asserts that a given directory view looks correct."""
    # Directory view page does a redirect to another page, extract its URL.
    with open(filepath) as f:
      data = f.read()

    url = re.search(r'.*refresh.*url=([a-zA-Z0-9_\-\/.]+).*', data).group(1)
    directory_view_path = os.path.join(os.path.dirname(filepath), url)

    # There must be at least 'crypto' and 'third_party' directories.
    with open(directory_view_path) as f:
      data = f.read()

    self.assertTrue('crypto' in data and 'third_party' in data)
Asserts that a given directory view looks correct.
Asserts that a given directory view looks correct.
Asserts that a given directory view looks correct .
def verify_directory_view(self, filepath):
    with open(filepath) as f:
      data = f.read()
    url = re.search(r'.*refresh.*url=([a-zA-Z0-9_\-\/.]+).*', data).group(1)
    directory_view_path = os.path.join(os.path.dirname(filepath), url)
    with open(directory_view_path) as f:
      data = f.read()
    self.assertTrue('crypto' in data and 'third_party' in data)
def verify_directory_view ( self , filepath ) : with open ( filepath ) as f : data = f . read ( ) url = re . search ( r'.*refresh.*url=([a-zA-Z0-9_\-\/.]+).*' , data ) . group ( 1 ) directory_view_path = os . path . join ( os . path . dirname ( filepath ) , url ) with open ( directory_view_path ) as f : data = f . read ( ) self . assertTrue ( 'crypto' in data and 'third_party' in data )
Asserts that a given directory view looks correct.
Asserts that a given directory view looks correct .
"""Asserts that a given directory view looks correct.""" # Directory view page does a redirect to another page, extract its URL. # There must be at least 'crypto' and 'third_party' directories.
self
filepath