<s> import os <EOL> from six . moves . configparser import ConfigParser <EOL> FILE_DIR = os . path . dirname ( __file__ ) <EOL> def read_test_ini ( file_dir = FILE_DIR , section = "<STR_LIT>" ) : <EOL> ini_file_path = os . path . join ( file_dir , "<STR_LIT>" ) <EOL> ret = { } <EOL> if os . path . isfile ( ini_file_path ) : <EOL> cp = ConfigParser ( ) <EOL> cp . read ( ini_file_path ) <EOL> if section not in cp . sections ( ) : <EOL> raise EnvironmentError ( <EOL> "<STR_LIT>" . format ( section ) ) <EOL> for arg in cp . options ( section ) : <EOL> ret [ arg ] = cp . get ( section , arg ) <EOL> else : <EOL> raise EnvironmentError ( <EOL> "<STR_LIT>" . format ( FILE_DIR ) ) <EOL> return ret </s>
