#NEWLINE# @ pytest . fixture #NEWLINE# def metavdirs( tmpdir ) : #NEWLINE# #INDENT# tmpdir = str ( tmpdir ) #NEWLINE# dirstructure = [ '/cal1/public/' , '/cal1/private/' , '/cal2/public/' , '/dir/cal3/public/' , '/dir/cal3/work/' , '/dir/cal3/home/' ] #NEWLINE# for one in dirstructure : #NEWLINE# #INDENT# os . makedirs ( ( tmpdir + one ) ) #NEWLINE# #UNINDENT# filestructure = [ ( '/cal1/public/displayname' , 'my calendar' ) , ( '/cal1/public/color' , 'red' ) , ( '/cal1/private/displayname' , 'my private calendar' ) , ( '/cal1/private/color' , '#FF00FF' ) ] #NEWLINE# for ( filename , content ) in filestructure : #NEWLINE# #INDENT# with open ( ( tmpdir + filename ) , 'w' ) as metafile : #NEWLINE# #INDENT# metafile . write ( content ) #NEWLINE# #UNINDENT# #UNINDENT# return tmpdir