tools/metrics/histograms/expand_owners_unittest.py
def testExpandOwnersWithoutOWNERSPathSuffix(self):
    """Checks that an error is raised when the path is not well-formatted."""
    histograms_without_owners_suffix = xml.dom.minidom.parseString("""
<histograms>

<histogram name="Caffeination" units="mg">
  <owner>joe@chromium.org</owner>
  <owner>src/latte/file</owner>
  <summary>I like coffee.</summary>
</histogram>

</histograms>
""")

    with self.assertRaisesRegexp(
        expand_owners.Error,
        r'The given path src/latte/file is not well-formatted.*\.'):
      expand_owners.ExpandHistogramsOWNERS(histograms_without_owners_suffix)
Checks that an error is raised when the path is not well-formatted.
Checks that an error is raised when the path is not well-formatted.
Checks that an error is raised when the path is not well - formatted .
def testExpandOwnersWithoutOWNERSPathSuffix(self):
    histograms_without_owners_suffix = xml.dom.minidom.parseString("""
<histograms>
<histogram name="Caffeination" units="mg">
  <owner>joe@chromium.org</owner>
  <owner>src/latte/file</owner>
  <summary>I like coffee.</summary>
</histogram>
</histograms>
""")
    with self.assertRaisesRegexp(
        expand_owners.Error,
        r'The given path src/latte/file is not well-formatted.*\.'):
      expand_owners.ExpandHistogramsOWNERS(histograms_without_owners_suffix)
def testExpandOwnersWithoutOWNERSPathSuffix ( self ) : histograms_without_owners_suffix = xml . dom . minidom . parseString ( """
<histograms>

<histogram name="Caffeination" units="mg">
  <owner>joe@chromium.org</owner>
  <owner>src/latte/file</owner>
  <summary>I like coffee.</summary>
</histogram>

</histograms>
""" ) with self . assertRaisesRegexp ( expand_owners . Error , r'The given path src/latte/file is not well-formatted.*\.' ) : expand_owners . ExpandHistogramsOWNERS ( histograms_without_owners_suffix )
Checks that an error is raised when the path is not well-formatted.
Checks that an error is raised when the path is not well - formatted .
"""Checks that an error is raised when the path is not well-formatted."""
self