def decompile_steps(): tcl = request.json proctcl = 'proc p {} {\n' + tcl + '\n}' tclpy.eval(proctcl) steps, changes = tcldis.decompile_steps(tcldis.getbc(proc_name='p')) return json.dumps({'steps': steps, 'changes': changes})
def assertDecompileStepStructure(self, tcl): proctcl = 'proc p {} {\n' + tcl + '\n}' tclpy.eval(proctcl) steps, changes = tcldis.decompile_steps(tcldis.getbc(proc_name='p')) checkDecompileStepStructure(self, steps, changes)
def assertTclEqual(self, tcl): proctcl = 'proc p {} {\n' + tcl + '\n}' tclpy.eval(proctcl) self.assertEqual(tcl, tcldis.decompile(tcldis.getbc(proc_name='p')))