diff options
Diffstat (limited to 'Lib/test/test_future.py')
-rw-r--r-- | Lib/test/test_future.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_future.py b/Lib/test/test_future.py index 61cd634..660701b 100644 --- a/Lib/test/test_future.py +++ b/Lib/test/test_future.py @@ -15,7 +15,7 @@ def get_error_location(msg): class FutureTest(unittest.TestCase): - def check_syntax_error(self, err, basename, lineno, offset=0): + def check_syntax_error(self, err, basename, lineno, offset=1): self.assertIn('%s.py, line %d' % (basename, lineno), str(err)) self.assertEqual(os.path.basename(err.filename), basename + '.py') self.assertEqual(err.lineno, lineno) @@ -68,12 +68,12 @@ class FutureTest(unittest.TestCase): def test_badfuture9(self): with self.assertRaises(SyntaxError) as cm: from test import badsyntax_future9 - self.check_syntax_error(cm.exception, "badsyntax_future9", 3, 0) + self.check_syntax_error(cm.exception, "badsyntax_future9", 3) def test_badfuture10(self): with self.assertRaises(SyntaxError) as cm: from test import badsyntax_future10 - self.check_syntax_error(cm.exception, "badsyntax_future10", 3, 0) + self.check_syntax_error(cm.exception, "badsyntax_future10", 3) def test_parserhack(self): # test that the parser.c::future_hack function works as expected |