#NEWLINE# def test_can_use_annotate_arg_with_provides( self ) : #NEWLINE# #INDENT# class ClassOne ( object ) : #NEWLINE# #INDENT# @ decorators . annotate_arg ( 'foo' , 'an-annotation' ) #NEWLINE# def __init__( self , foo ) : #NEWLINE# #INDENT# self . foo = foo #NEWLINE# #UNINDENT# #UNINDENT# class SomeBindingSpec ( bindings . BindingSpec ) : #NEWLINE# #INDENT# @ decorators . provides ( annotated_with = 'an-annotation' ) #NEWLINE# @ decorators . annotate_arg ( 'bar' , 'another-annotation' ) #NEWLINE# def provide_foo( self , bar ) : #NEWLINE# #INDENT# return 'a-foo with {0}' . format ( bar ) #NEWLINE# #UNINDENT# @ decorators . provides ( annotated_with = 'another-annotation' ) #NEWLINE# def provide_bar( self ) : #NEWLINE# #INDENT# return 'a-bar' #NEWLINE# #UNINDENT# #UNINDENT# obj_graph = object_graph . new_object_graph ( modules = None , classes = [ ClassOne ] , binding_specs = [ SomeBindingSpec ( ) ] ) #NEWLINE# class_one = obj_graph . provide ( ClassOne ) #NEWLINE# self . assertEqual ( 'a-foo with a-bar' , self . foo )