def setup_test_files():
 dir1 = tempfile.mkdtemp('dir1')
 dir2 = tempfile.mkdtemp('dir2')
 config1 = os.path.join(dir1, 'config.txt')
 config2 = os.path.join(dir2, 'config.txt')
 with open(config1, 'w') as file_fd:
  file_fd.write('directive-dir1')
 with open(config2, 'w') as file_fd:
  file_fd.write('directive-dir2')
 sets = [set([config1]), set([config2]), set([config1, config2])]
 return (config1, config2, dir1, dir2, sets)

def setup_test_files ( ) : dir1 = tempfile . mkdtemp ( 'dir1' ) dir2 = tempfile . mkdtemp ( 'dir2' ) config1 = os . path . join ( dir1 , 'config.txt' ) config2 = os . path . join ( dir2 , 'config.txt' ) with open ( config1 , 'w' ) as file_fd : file_fd . write ( 'directive-dir1' ) with open ( config2 , 'w' ) as file_fd : file_fd . write ( 'directive-dir2' ) sets = [ set ( [ config1 ] ) , set ( [ config2 ] ) , set ( [ config1 , config2 ] ) ] return ( config1 , config2 , dir1 , dir2 , sets )
setup sample configuration files .