[pypy-commit] pypy default: add tests to prove issue 1713 and issue 1673
wenzhuman
noreply at buildbot.pypy.org
Wed May 28 22:05:28 CEST 2014
Author: wenzhuman <manwenzhu at gamil.com>
Branch:
Changeset: r71757:5d13e1a985f6
Date: 2014-03-19 22:19 -0400
http://bitbucket.org/pypy/pypy/changeset/5d13e1a985f6/
Log: add tests to prove issue 1713 and issue 1673
diff --git a/pypy/module/_ast/test/test_ast.py b/pypy/module/_ast/test/test_ast.py
--- a/pypy/module/_ast/test/test_ast.py
+++ b/pypy/module/_ast/test/test_ast.py
@@ -387,3 +387,34 @@
mod.body[0].body[0].handlers[0].lineno = 7
mod.body[0].body[0].handlers[1].lineno = 6
code = compile(mod, "<test>", "exec")
+ def test_dict_astNode(self):
+ import ast
+ numMode = ast.Num(n=2,lineno=2,col_offset=3)
+ dictRes = numMode.__dict__
+ assert dictRes['n'] == 2
+ assert dictRes['lineno'] == 2
+ assert dictRes['col_offset'] == 3
+ def test_issue1673_Num_notfullinit(self):
+ import ast
+ import copy
+ numMode = ast.Num(n=2,lineno=2)
+ try:
+ numNode2 = copy.deepcopy(numMode)
+ except:
+ raise
+ def test_issue1673_Num_fullinit(self):
+ import ast
+ import copy
+ numMode = ast.Num(n=2,lineno=2,col_offset=3)
+ try:
+ numNode2 = copy.deepcopy(numMode)
+ except:
+ raise
+ def test_issue1673_Str(self):
+ import ast
+ import copy
+ strNode = ast.Str(n=2,lineno=2)
+ try:
+ strNode2 = copy.deepcopy(strNode)
+ except:
+ raise
More information about the pypy-commit
mailing list