#NEWLINE# def test_register_exposed_object( self ) : #NEWLINE# #INDENT# self . _register_aliases ( objects = { #NEWLINE# #INDENT# 'jane' : 42 , #NEWLINE# #UNINDENT# } ) #NEWLINE# aliases = self . build_configuration . registered_aliases ( ) #NEWLINE# self . assertEqual ( { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , aliases . target_types ) #NEWLINE# self . assertEqual ( { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , aliases . target_macro_factories ) #NEWLINE# self . assertEqual ( { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , aliases . context_aware_object_factories ) #NEWLINE# self . assertEqual ( dict ( jane = 42 ) , aliases . objects ) #NEWLINE# with self . _create_mock_build_file ( 'jane' ) as build_file : #NEWLINE# #INDENT# parse_state = self . build_configuration . initialize_parse_state ( build_file ) #NEWLINE# self . assertEqual ( 0 , len ( parse_state . registered_addressable_instances ) ) #NEWLINE# self . assertEqual ( 1 , len ( parse_state . parse_globals ) ) #NEWLINE# self . assertEqual ( 42 , parse_state . parse_globals [ 'jane' ] )