summaryrefslogtreecommitdiff
path: root/Lib/test/test_future.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2013-03-16 09:15:47 -0700
committerBenjamin Peterson <benjamin@python.org>2013-03-16 09:15:47 -0700
commit2d6acd2ac2399ecc0f163c12c5695f434ba14955 (patch)
tree0f49c3803c6c58b3ff149e231f81d43ea230a903 /Lib/test/test_future.py
parent694bafa04ed7af12c86ca28217d143ab74428b2f (diff)
downloadcpython-git-2d6acd2ac2399ecc0f163c12c5695f434ba14955.tar.gz
reject non-docs strings between future imports (closes #17434)
Diffstat (limited to 'Lib/test/test_future.py')
-rw-r--r--Lib/test/test_future.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_future.py b/Lib/test/test_future.py
index a0c156f5f7..beac993e4d 100644
--- a/Lib/test/test_future.py
+++ b/Lib/test/test_future.py
@@ -82,6 +82,14 @@ class FutureTest(unittest.TestCase):
else:
self.fail("expected exception didn't occur")
+ def test_badfuture10(self):
+ try:
+ from test import badsyntax_future10
+ except SyntaxError as msg:
+ self.assertEqual(get_error_location(msg), ("badsyntax_future10", '3'))
+ else:
+ self.fail("expected exception didn't occur")
+
def test_parserhack(self):
# test that the parser.c::future_hack function works as expected
# Note: although this test must pass, it's not testing the original