#NEWLINE# def test_given_subdir_content_replaced( self ) : #NEWLINE# #INDENT# tf = os . path . join ( self . repo , 'debian' , 'debian-file.postinstall' ) #NEWLINE# with open ( tf , 'wb' ) as f : #NEWLINE# #INDENT# f . write ( 'dependency-with-{{ version }}' ) #NEWLINE# #UNINDENT# self . do_piped_command_for_success ( [ 'git' , 'add' , '*' ] ) #NEWLINE# self . commit ( message = 'requirements' ) #NEWLINE# check_call ( [ 'python' , 'setup.py' , 'compute_version_git' ] , stdout = PIPE , stderr = PIPE ) #NEWLINE# check_call ( [ 'python' , 'setup.py' , 'replace_templates' ] , stdout = PIPE , stderr = PIPE ) #NEWLINE# with open ( os . path . join ( self . repo , 'debian' , 'debian-file.postinstall' ) ) as f : #NEWLINE# #INDENT# assert_equals ( ( 'dependency-with-%s.1' % self . PROJECT_VERSION_TAG ) , f . read ( ) )