tools/metrics/histograms/expand_owners_unittest.py
def testGetHigherLevelPath(self):
    """Checks that higher directories are recursively checked for OWNERS.

    Also, checks that there isn't a recursive loop.
    """
    path = expand_owners._GetOwnersFilePath('src/banana/chocolate/OWNERS')
    result = expand_owners._GetHigherLevelOwnersFilePath(path)

    # The condition is true when the tools directory's parent directory is src,
    # which is generally the case locally. However, the parent directory is not
    # always src, e.g. on various testing bots.
    if os.path.basename(_GetToolsParentDir()) == 'src':
      self.assertRegexpMatches(result, r'.*OWNERS')
    else:
      self.assertEqual(result, '')
Checks that higher directories are recursively checked for OWNERS.

    Also, checks that there isn't a recursive loop.
    
Checks that higher directories are recursively checked for OWNERS.
Also, checks that there isn't a recursive loop.
Checks that higher directories are recursively checked for OWNERS . Also checks that there isn ' t a recursive loop .
def testGetHigherLevelPath(self):
    path = expand_owners._GetOwnersFilePath('src/banana/chocolate/OWNERS')
    result = expand_owners._GetHigherLevelOwnersFilePath(path)
    if os.path.basename(_GetToolsParentDir()) == 'src':
      self.assertRegexpMatches(result, r'.*OWNERS')
    else:
      self.assertEqual(result, '')
def testGetHigherLevelPath ( self ) : path = expand_owners . _GetOwnersFilePath ( 'src/banana/chocolate/OWNERS' ) result = expand_owners . _GetHigherLevelOwnersFilePath ( path ) if os . path . basename ( _GetToolsParentDir ( ) ) == 'src' : self . assertRegexpMatches ( result , r'.*OWNERS' ) else : self . assertEqual ( result , '' )
Checks that higher directories are recursively checked for OWNERS.
Checks that higher directories are recursively checked for OWNERS .
"""Checks that higher directories are recursively checked for OWNERS.

    Also, checks that there isn't a recursive loop.
    """ # The condition is true when the tools directory's parent directory is src, # which is generally the case locally. However, the parent directory is not # always src, e.g. on various testing bots.
self