#NEWLINE# @ pytest . yield_fixture #NEWLINE# def encoding_csv( tmpdir ) : #NEWLINE# #INDENT# path = os . path . join ( os . path . dirname ( __file__ ) , 'encoding.csv' ) #NEWLINE# with tmpfile ( '.csv' , dir = tmpdir ) as fn : #NEWLINE# #INDENT# with open ( fn , 'wb' ) as f , open ( path , 'r' ) as g : #NEWLINE# #INDENT# f . write ( g . read ( ) . encode ( 'latin1' ) ) #NEWLINE# #UNINDENT# ( yield CSV ( fn ) )