summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_ast.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_ast.py')
-rw-r--r--Lib/test/test_ast.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_ast.py b/Lib/test/test_ast.py
index c22d0d4..7ee16bf 100644
--- a/Lib/test/test_ast.py
+++ b/Lib/test/test_ast.py
@@ -140,6 +140,14 @@ class AST_Tests(unittest.TestCase):
self.assertEquals(to_tuple(ast_tree), o)
self._assertTrueorder(ast_tree, (0, 0))
+ def test_base_classes(self):
+ self.assertTrue(issubclass(ast.For, ast.stmt))
+ self.assertTrue(issubclass(ast.Name, ast.expr))
+ self.assertTrue(issubclass(ast.stmt, ast.AST))
+ self.assertTrue(issubclass(ast.expr, ast.AST))
+ self.assertTrue(issubclass(ast.comprehension, ast.AST))
+ self.assertTrue(issubclass(ast.Gt, ast.AST))
+
def test_nodeclasses(self):
x = ast.BinOp(1, 2, 3, lineno=0)
self.assertEquals(x.left, 1)