Пример #1
0
 def test_number(self):
     tree = transform("a=<:number:>", dict(number=ast.Num(3)))
     env = {}
     exec(compile(tree, "<string>", "exec"), env)
     assert env["a"] == 3
Пример #2
0
 def test_number(self):
     tree = transform('a=<:number:>', dict(number=ast.Num(3)))
     env = {}
     exec(compile(tree, '<string>', 'exec'), env)
     assert env['a'] == 3
Пример #3
0
 def test_nothing(self):
     tree = transform("a=3", {})
     env = {}
     exec(compile(tree, "<string>", "exec"), env)
     assert env["a"] == 3
Пример #4
0
 def test_nothing(self):
     tree = transform('a=3', {})
     env = {}
     exec(compile(tree, '<string>', 'exec'), env)
     assert env['a'] == 3