def randomize_predicate(predicate):
    randomizer = PredicateRandomizer()
    tree = randomizer.visit(parse(predicate))
    return ast2code.to_source(tree)
Exemple #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)
def randomize_predicate(predicate):
  randomizer = PredicateRandomizer()
  tree = randomizer.visit(parse(predicate))
  return ast2code.to_source(tree)
Exemple #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)