示例#1
0
def randomize_predicate(predicate):
    randomizer = PredicateRandomizer()
    tree = randomizer.visit(parse(predicate))
    return ast2code.to_source(tree)
示例#2
0
 def change_context(self, string, old, new):
   self.old = old
   self.new = new
   tree = ast.parse(string, mode='eval')
   self.visit(tree)
   return ast2code.to_source(tree)
示例#3
0
def randomize_predicate(predicate):
  randomizer = PredicateRandomizer()
  tree = randomizer.visit(parse(predicate))
  return ast2code.to_source(tree)
示例#4
0
 def change_context(self, string, old, new):
     self.old = old
     self.new = new
     tree = ast.parse(string, mode='eval')
     self.visit(tree)
     return ast2code.to_source(tree)