diff options
Diffstat (limited to 'Lib/test/test_ast.py')
| -rw-r--r-- | Lib/test/test_ast.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_ast.py b/Lib/test/test_ast.py index 54a3b35b7a..021ae95bb2 100644 --- a/Lib/test/test_ast.py +++ b/Lib/test/test_ast.py @@ -140,6 +140,16 @@ class AST_Tests(unittest.TestCase): self.assertEquals(to_tuple(ast_tree), o) self._assert_order(ast_tree, (0, 0)) + def test_slice(self): + slc = ast.parse("x[::]").body[0].value.slice + self.assertIsNone(slc.upper) + self.assertIsNone(slc.lower) + self.assertIsNone(slc.step) + + def test_from_import(self): + im = ast.parse("from . import y").body[0] + self.assertIsNone(im.module) + def test_nodeclasses(self): x = ast.BinOp(1, 2, 3, lineno=0) self.assertEquals(x.left, 1) |
