#NEWLINE# def testScope_partialAlias_typeOnly( self ) : #NEWLINE# #INDENT# "Tests a partial alias only used in type annotations.\n\n    In this example, some goog.events namespace would need to be required\n    so that evaluating goog.events.bar doesn't throw an error.\n    " #NEWLINE# input_lines = [ 'goog.scope(function() {' , 'var bar = goog.events.bar;' , '/** @type {bar.Foo} */;' , '});' ] #NEWLINE# namespaces_info = self . _GetNamespacesInfoForScript ( input_lines , [ 'goog' ] ) #NEWLINE# ( missing_requires , illegal_alias_stmts ) = namespaces_info . GetMissingRequires ( ) #NEWLINE# self . assertEquals ( { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , missing_requires ) #NEWLINE# self . assertEquals ( { #NEWLINE# #INDENT# 'goog.events' : 2 , #NEWLINE# #UNINDENT# } , _ToLineDict ( self ) )