summaryrefslogtreecommitdiff
path: root/Lib/test/test_ast.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-07-20 20:28:08 +0000
committerBenjamin Peterson <benjamin@python.org>2009-07-20 20:28:08 +0000
commit4879c907ce32655e76c74aee9f49e4be99b862af (patch)
tree16dda3717a5358bd000a44e9a17a6bfb6e60d4c1 /Lib/test/test_ast.py
parenta2514f4ce9b8333659aae057b3e9f38147151b54 (diff)
downloadcpython-git-4879c907ce32655e76c74aee9f49e4be99b862af.tar.gz
the Slice in x[::] has to have step as None to help the interpreter
Diffstat (limited to 'Lib/test/test_ast.py')
-rw-r--r--Lib/test/test_ast.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_ast.py b/Lib/test/test_ast.py
index 4e311e4473..6dca5d2e65 100644
--- a/Lib/test/test_ast.py
+++ b/Lib/test/test_ast.py
@@ -150,7 +150,8 @@ class AST_Tests(unittest.TestCase):
slc = ast.parse("x[::]").body[0].value.slice
self.assertIsNone(slc.upper)
self.assertIsNone(slc.lower)
- self.assertIsNone(slc.step)
+ self.assertTrue(isinstance(slc.step, ast.Name))
+ self.assertEqual(slc.step.id, "None")
def test_from_import(self):
im = ast.parse("from . import y").body[0]