Exemplo n.º 1
0
 def compileActual(self, code):
     r = StringReader(code)
     s = read(r, True, None, True)
     res = self.comp.compile(s)
     fn = self.comp.executeCode(res)
     return [c for c in Code.from_code(fn.func_code).code[:] if c[0] is not SetLineno]
Exemplo n.º 2
0
 def compileExpected(self, code):
     codeobject = compile(dedent(code), "string", "exec")
     globs = {}
     result = eval(codeobject, {}, globs)
     return [c for c in Code.from_code(globs["abc"].func_code).code[:] if c[0] is not SetLineno]