diff options
author | Anthony Baxter <anthonybaxter@gmail.com> | 2004-08-31 10:07:13 (GMT) |
---|---|---|
committer | Anthony Baxter <anthonybaxter@gmail.com> | 2004-08-31 10:07:13 (GMT) |
commit | 1a4ddaecc732c207fa69890db87ac4b47da867b8 (patch) | |
tree | 3c0c9c3086bc1c5ac72554e8ce6a03773cdc8770 /Lib/test/test_parser.py | |
parent | 876032e5700f58cec44a357b6d3174be76b40278 (diff) | |
download | cpython-1a4ddaecc732c207fa69890db87ac4b47da867b8.zip cpython-1a4ddaecc732c207fa69890db87ac4b47da867b8.tar.gz cpython-1a4ddaecc732c207fa69890db87ac4b47da867b8.tar.bz2 |
SF patch #1007189, multi-line imports, for instance:
"from blah import (foo, bar
baz, bongo)"
Diffstat (limited to 'Lib/test/test_parser.py')
-rw-r--r-- | Lib/test/test_parser.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Lib/test/test_parser.py b/Lib/test/test_parser.py index 978ce57..0f8c1d0 100644 --- a/Lib/test/test_parser.py +++ b/Lib/test/test_parser.py @@ -130,12 +130,26 @@ class RoundtripLegalSyntaxTestCase(unittest.TestCase): def test_import_from_statement(self): self.check_suite("from sys.path import *") self.check_suite("from sys.path import dirname") + self.check_suite("from sys.path import (dirname)") + self.check_suite("from sys.path import (dirname,)") self.check_suite("from sys.path import dirname as my_dirname") + self.check_suite("from sys.path import (dirname as my_dirname)") + self.check_suite("from sys.path import (dirname as my_dirname,)") self.check_suite("from sys.path import dirname, basename") + self.check_suite("from sys.path import (dirname, basename)") + self.check_suite("from sys.path import (dirname, basename,)") self.check_suite( "from sys.path import dirname as my_dirname, basename") self.check_suite( + "from sys.path import (dirname as my_dirname, basename)") + self.check_suite( + "from sys.path import (dirname as my_dirname, basename,)") + self.check_suite( "from sys.path import dirname, basename as my_basename") + self.check_suite( + "from sys.path import (dirname, basename as my_basename)") + self.check_suite( + "from sys.path import (dirname, basename as my_basename,)") def test_basic_import_statement(self): self.check_suite("import sys") |