gh-98811: use full source location to simplify __future__ imports error checking. This also fixes an incorrect error offset. (GH-98812)

This commit is contained in:
Irit Katriel 2022-10-31 13:08:03 +00:00 committed by GitHub
parent 29f98b46b7
commit 39448adc9d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 71 additions and 69 deletions

View file

@ -60,7 +60,7 @@ class FutureTest(unittest.TestCase):
def test_badfuture7(self):
with self.assertRaises(SyntaxError) as cm:
from test import badsyntax_future7
self.check_syntax_error(cm.exception, "badsyntax_future7", 3, 53)
self.check_syntax_error(cm.exception, "badsyntax_future7", 3, 54)
def test_badfuture8(self):
with self.assertRaises(SyntaxError) as cm: