#NEWLINE# def test_load_environment_with_prefix( self ) : #NEWLINE# #INDENT# import types #NEWLINE# module = types . ModuleType ( 'testing' ) #NEWLINE# module2 = types . ModuleType ( 'testing2' ) #NEWLINE# module . environment = Environment ( ) #NEWLINE# module2 . assets = Environment ( ) #NEWLINE# sys . modules [ 'testing' ] = module #NEWLINE# sys . modules [ 'testing2' ] = module2 #NEWLINE# loader = PythonLoader ( 'testing' ) #NEWLINE# env = loader . load_environment ( ) #NEWLINE# assert ( env == module . environment ) #NEWLINE# loader2 = PythonLoader ( 'testing:environment' ) #NEWLINE# assert ( loader2 . environment == 'environment' ) #NEWLINE# env2 = loader2 . load_environment ( ) #NEWLINE# assert ( env2 == module . environment ) #NEWLINE# loader3 = PythonLoader ( 'testing2:assets' ) #NEWLINE# assert ( loader3 . environment == 'assets' ) #NEWLINE# env3 = loader3 . load_environment ( ) #NEWLINE# assert ( module == module2 . assets )