[pypy-svn] pypy default: Skip part of the test: PyPy now adds a __dict__ to ast.AST objects.
amauryfa
commits-noreply at bitbucket.org
Mon Mar 14 20:22:03 CET 2011
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch:
Changeset: r42639:4f55bea2b969
Date: 2011-03-14 19:54 +0100
http://bitbucket.org/pypy/pypy/changeset/4f55bea2b969/
Log: Skip part of the test: PyPy now adds a __dict__ to ast.AST objects.
diff --git a/lib-python/modified-2.7.0/test/test_ast.py b/lib-python/modified-2.7.0/test/test_ast.py
--- a/lib-python/modified-2.7.0/test/test_ast.py
+++ b/lib-python/modified-2.7.0/test/test_ast.py
@@ -195,22 +195,26 @@
self._assertTrueorder(value, parent_pos)
def test_AST_objects(self):
- x = ast.AST()
- try:
- x.foobar = 21
- except AttributeError, e:
- self.assertEquals(e.args[0],
- "'_ast.AST' object has no attribute 'foobar'")
- else:
- self.assert_(False)
+ if test_support.check_impl_detail():
+ # PyPy also provides a __dict__ to the ast.AST base class.
- try:
- ast.AST(lineno=2)
- except AttributeError, e:
- self.assertEquals(e.args[0],
- "'_ast.AST' object has no attribute 'lineno'")
- else:
- self.assert_(False)
+ x = ast.AST()
+ try:
+ x.foobar = 21
+ except AttributeError, e:
+ self.assertEquals(e.args[0],
+ "'_ast.AST' object has no attribute 'foobar'")
+ else:
+ self.assert_(False)
+
+ try:
+ ast.AST(lineno=2)
+ except AttributeError, e:
+ self.assertEquals(e.args[0],
+ "'_ast.AST' object has no attribute 'lineno'")
+ else:
+ self.assert_(False)
+
try:
ast.AST(2)
except TypeError, e:
More information about the Pypy-commit
mailing list