<s> from __future__ import unicode_literals <EOL> from __future__ import print_function <EOL> import os <EOL> import codecs <EOL> def read_fixture_lines ( filename ) : <EOL> """<STR_LIT>""" <EOL> lines = [ ] <EOL> for line in codecs . open ( filename , '<STR_LIT:rb>' , encoding = '<STR_LIT:utf-8>' ) : <EOL> lines . append ( line . strip ( ) ) <EOL> return lines <EOL> def read_fixture_files ( ) : <EOL> """<STR_LIT>""" <EOL> fixture_dict = { } <EOL> current_dir = os . path . dirname ( __file__ ) <EOL> fixture_dir = os . path . join ( current_dir , '<STR_LIT>' ) <EOL> for filename in os . listdir ( fixture_dir ) : <EOL> if filename not in [ '<STR_LIT:.>' , '<STR_LIT:..>' ] : <EOL> fullname = os . path . join ( fixture_dir , filename ) <EOL> fixture_dict [ filename ] = read_fixture_lines ( fullname ) <EOL> return fixture_dict </s>
