mojo/public/tools/mojom/enum_unittest.py
def testInvalidConstantReference(self):
    """Verifies that enum values cannot be assigned from the value of
    non-integral constants."""
    with self.assertRaisesRegexp(ValueError, 'not an integer'):
      self.ExtractTypes('const float kFoo = 1.0; enum E { kA = kFoo };')
    with self.assertRaisesRegexp(ValueError, 'not an integer'):
      self.ExtractTypes('const double kFoo = 1.0; enum E { kA = kFoo };')
    with self.assertRaisesRegexp(ValueError, 'not an integer'):
      self.ExtractTypes('const string kFoo = "lol"; enum E { kA = kFoo };')
Verifies that enum values cannot be assigned from the value of
    non-integral constants.
Verifies that enum values cannot be assigned from the value of
non-integral constants.
Verifies that enum values cannot be assigned from the value of non - integral constants .
def testInvalidConstantReference(self):
    with self.assertRaisesRegexp(ValueError, 'not an integer'):
      self.ExtractTypes('const float kFoo = 1.0; enum E { kA = kFoo };')
    with self.assertRaisesRegexp(ValueError, 'not an integer'):
      self.ExtractTypes('const double kFoo = 1.0; enum E { kA = kFoo };')
    with self.assertRaisesRegexp(ValueError, 'not an integer'):
      self.ExtractTypes('const string kFoo = "lol"; enum E { kA = kFoo };')
def testInvalidConstantReference ( self ) : with self . assertRaisesRegexp ( ValueError , 'not an integer' ) : self . ExtractTypes ( 'const float kFoo = 1.0; enum E { kA = kFoo };' ) with self . assertRaisesRegexp ( ValueError , 'not an integer' ) : self . ExtractTypes ( 'const double kFoo = 1.0; enum E { kA = kFoo };' ) with self . assertRaisesRegexp ( ValueError , 'not an integer' ) : self . ExtractTypes ( 'const string kFoo = "lol"; enum E { kA = kFoo };' )
Verifies that enum values cannot be assigned from the value of
non-integral constants.
Verifies that enum values cannot be assigned from the value of non - integral constants .
"""Verifies that enum values cannot be assigned from the value of
    non-integral constants."""
self