mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
reject non-docs strings between future imports (closes #17434)
This commit is contained in:
parent
694bafa04e
commit
2d6acd2ac2
4 changed files with 28 additions and 11 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue