diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-10-27 20:59:18 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-10-27 20:59:18 (GMT) |
commit | 26a93c0082af09d8e8837d569625c3fc9cfd6639 (patch) | |
tree | 722827342d56d05e77130d1decda54bb90c31607 | |
parent | 8319170abbe5bd9bc88deee384001a89b59f50fb (diff) | |
download | cpython-26a93c0082af09d8e8837d569625c3fc9cfd6639.zip cpython-26a93c0082af09d8e8837d569625c3fc9cfd6639.tar.gz cpython-26a93c0082af09d8e8837d569625c3fc9cfd6639.tar.bz2 |
test expect base classes
-rw-r--r-- | Lib/test/test_ast.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_ast.py b/Lib/test/test_ast.py index 14e31bd..e592032 100644 --- a/Lib/test/test_ast.py +++ b/Lib/test/test_ast.py @@ -161,6 +161,14 @@ class AST_Tests(unittest.TestCase): im = ast.parse("from . import y").body[0] self.assertIsNone(im.module) + 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) |