mojo/public/tools/mojom/mojom/generate/translate_unittest.py
def testMapKindRaisesWithDuplicate(self):
    """Verifies _MapTreeForType() raises when passed two values with the same
       name."""
    methods = [
        ast.Method('dup', None, None, ast.ParameterList(), None),
        ast.Method('dup', None, None, ast.ParameterList(), None)
    ]
    with self.assertRaises(Exception):
      translate._ElemsOfType(methods, ast.Method, 'scope')
Verifies _MapTreeForType() raises when passed two values with the same
       name.
Verifies _MapTreeForType() raises when passed two values with the same
name.
Verifies _MapTreeForType () raises when passed two values with the same name .
def testMapKindRaisesWithDuplicate(self):
    methods = [
        ast.Method('dup', None, None, ast.ParameterList(), None),
        ast.Method('dup', None, None, ast.ParameterList(), None)
    ]
    with self.assertRaises(Exception):
      translate._ElemsOfType(methods, ast.Method, 'scope')
def testMapKindRaisesWithDuplicate ( self ) : methods = [ ast . Method ( 'dup' , None , None , ast . ParameterList ( ) , None ) , ast . Method ( 'dup' , None , None , ast . ParameterList ( ) , None ) ] with self . assertRaises ( Exception ) : translate . _ElemsOfType ( methods , ast . Method , 'scope' )
Verifies _MapTreeForType() raises when passed two values with the same
name.
Verifies _MapTreeForType () raises when passed two values with the same name .
"""Verifies _MapTreeForType() raises when passed two values with the same
       name."""
self