Skip to content
Snippets Groups Projects
Commit 5db02f27 authored by Marko Mecina's avatar Marko Mecina
Browse files

fix formatting in python script generator

parent 02acdd5c
No related branches found
No related tags found
No related merge requests found
......@@ -46,13 +46,13 @@ def run(jfile, outfile, reportfunc=False, specfile=None):
script += 'report = cfl.TestReport(specfile, rep_version, mib_version, gui=True)\n\n'
# init code
script += '# INIT CODE\n{}\n#! CCS.BREAKPOINT\n\n'.format(data['_custom_imports'])
script += '# INIT CODE\n{}\n#! CCS.BREAKPOINT\n\n'.format(data.get('_custom_imports'))
script += '# PRECONDITIONS\n# {}\n#! CCS.BREAKPOINT\n\n'.format(replace_newline(data['_precon_descr']))
# script += '{}\n\n\n'.format(data['_precon_code'].strip()) # Add the precondition code
for step in data['sequences'][0]['steps']:
comment = '# COMMENT: {}\n'.format(step['_step_comment'].strip()) if step['_step_comment'] != '' else ''
comment = '# COMMENT: {}\n'.format(replace_newline(step['_step_comment'])) if step['_step_comment'] != '' else ''
cmd_code = step['_command_code'].strip()
cmd_code += '\n' if cmd_code else ''
......@@ -68,9 +68,9 @@ def run(jfile, outfile, reportfunc=False, specfile=None):
'# {}\n' \
'{}' \
'{}' \
'# VERIFICATION: {}\n{}{}\n#! CCS.BREAKPOINT\n\n'.format(step['_step_number'], step['_description'].strip(), exec_step,
'# VERIFICATION: {}\n{}{}\n#! CCS.BREAKPOINT\n\n'.format(step['_step_number'], replace_newline(step['_description']), exec_step,
cmd_code,
step['_verification_description'].strip(),
replace_newline(step['_verification_description']),
verif_step,
# step['_verification_code'].strip(), # Add verification code
comment)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment