diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2010-07-04 18:39:48 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2010-07-04 18:39:48 (GMT) |
commit | 0dce815c2b3dc66794e34cd589d6873003562707 (patch) | |
tree | fb79364c205428835a899d48802a30bf61dd8dbd /Lib/test/test_parser.py | |
parent | 1b9b5727cc85c4aec17c2fa79f9491d986dbb00e (diff) | |
download | cpython-0dce815c2b3dc66794e34cd589d6873003562707.zip cpython-0dce815c2b3dc66794e34cd589d6873003562707.tar.gz cpython-0dce815c2b3dc66794e34cd589d6873003562707.tar.bz2 |
Merged revisions 82555 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r82555 | mark.dickinson | 2010-07-04 19:38:57 +0100 (Sun, 04 Jul 2010) | 2 lines
Issue #9130: Validate ellipsis tokens in relative imports.
........
Diffstat (limited to 'Lib/test/test_parser.py')
-rw-r--r-- | Lib/test/test_parser.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_parser.py b/Lib/test/test_parser.py index 17111b0..04b45be 100644 --- a/Lib/test/test_parser.py +++ b/Lib/test/test_parser.py @@ -193,8 +193,14 @@ class RoundtripLegalSyntaxTestCase(unittest.TestCase): def test_relative_imports(self): self.check_suite("from . import name") self.check_suite("from .. import name") + # check all the way up to '....', since '...' is tokenized + # differently from '.' (it's an ellipsis token). + self.check_suite("from ... import name") + self.check_suite("from .... import name") self.check_suite("from .pkg import name") self.check_suite("from ..pkg import name") + self.check_suite("from ...pkg import name") + self.check_suite("from ....pkg import name") def test_pep263(self): self.check_suite("# -*- coding: iso-8859-1 -*-\n" |