#NEWLINE# @ pytest . mark . usefixtures ( 'remove_cheese_file' ) #NEWLINE# def test_generate_file( env ) : #NEWLINE# #INDENT# infile = 'tests/files/{{generate_file}}.txt' #NEWLINE# generate . generate_file ( project_dir = '.' , infile = infile , context = { #NEWLINE# #INDENT# 'generate_file' : 'cheese' , #NEWLINE# #UNINDENT# } , env = env ) #NEWLINE# assert os . path . isfile ( 'tests/files/cheese.txt' ) #NEWLINE# with open ( 'tests/files/cheese.txt' , 'rt' ) as f : #NEWLINE# #INDENT# generated_text = f . read ( ) #NEWLINE# assert ( generated_text == 'Testing cheese' )