Пример #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)