def create_test_queries(self): #read in content of input file with open(self._path_input_file, 'r') as f: content = f.read() evaluator = Evaluator(content) list_queries = evaluator.parse() evaluator.write_queries(list_queries, self._path_output_file)
def main(): if len(sys.argv) < 3: raise MissingCommandLineArgumentsError( 'Usage: python sqltester.py --input=[pathInputFile] ' + ' --output=[pathOutputFile]') list_command_line_parameters = command_line_parser(sys.argv[1:]) missing_command_line_arguments = check_required_command_line_arguments_exist( list_command_line_parameters, REQUIRED_COMMAND_LINE_ARGUMENTS) if missing_command_line_arguments: raise MissingCommandLineArgumentsError( 'Usage: python sqltester.py --input=[pathInputFile] ' + ' --output=[pathOutputFile]') path_input_file = '' path_output_file = '' for pair in list_command_line_parameters: command_line_argument, command_line_value = pair if command_line_argument == 'input': path_input_file = command_line_value if command_line_argument == 'output': path_output_file = command_line_value #read in content of input file with open(path_input_file, 'r') as f: content = f.read() evaluator = Evaluator(content) list_queries = evaluator.parse() evaluator.write_queries(list_queries, path_output_file)
def main(): if len(sys.argv) < 3: raise MissingCommandLineArgumentsError('Usage: python sqltester.py --input=[pathInputFile] ' + ' --output=[pathOutputFile]') list_command_line_parameters = command_line_parser(sys.argv[1:]) missing_command_line_arguments = check_required_command_line_arguments_exist(list_command_line_parameters, REQUIRED_COMMAND_LINE_ARGUMENTS) if missing_command_line_arguments: raise MissingCommandLineArgumentsError('Usage: python sqltester.py --input=[pathInputFile] ' + ' --output=[pathOutputFile]') path_input_file = '' path_output_file = '' for pair in list_command_line_parameters: command_line_argument, command_line_value = pair if command_line_argument == 'input': path_input_file = command_line_value if command_line_argument == 'output': path_output_file = command_line_value #read in content of input file with open(path_input_file, 'r') as f: content = f.read() evaluator = Evaluator(content) list_queries = evaluator.parse() evaluator.write_queries(list_queries, path_output_file)