summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_ast.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2012-03-12 16:46:44 (GMT)
committerBenjamin Peterson <benjamin@python.org>2012-03-12 16:46:44 (GMT)
commit7e0dbfbbdea946e620804641755686475652c9d0 (patch)
treee35bb7f1c8cbc8c0cd656a2ac9d54b5222f6f710 /Lib/test/test_ast.py
parent61a4161de4075918c1ad5f225498171290454e5d (diff)
downloadcpython-7e0dbfbbdea946e620804641755686475652c9d0.zip
cpython-7e0dbfbbdea946e620804641755686475652c9d0.tar.gz
cpython-7e0dbfbbdea946e620804641755686475652c9d0.tar.bz2
give the AST class a __dict__
Diffstat (limited to 'Lib/test/test_ast.py')
-rw-r--r--Lib/test/test_ast.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_ast.py b/Lib/test/test_ast.py
index bac52be..064c669 100644
--- a/Lib/test/test_ast.py
+++ b/Lib/test/test_ast.py
@@ -196,6 +196,9 @@ class AST_Tests(unittest.TestCase):
def test_AST_objects(self):
x = ast.AST()
self.assertEqual(x._fields, ())
+ x.foobar = 42
+ self.assertEqual(x.foobar, 42)
+ self.assertEqual(x.__dict__["foobar"], 42)
with self.assertRaises(AttributeError):
x.vararg