diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2023-06-20 03:05:20 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-20 03:05:20 (GMT) |
commit | cc18a8b78ac85159dad8f2f3ee93799f5df6fa82 (patch) | |
tree | 460cdbce29a0ddd9527e529b665db11e7baa259d /Lib | |
parent | 225cc4c043aca472f0c7c78bed1a7524fae5c278 (diff) | |
download | cpython-cc18a8b78ac85159dad8f2f3ee93799f5df6fa82.zip cpython-cc18a8b78ac85159dad8f2f3ee93799f5df6fa82.tar.gz cpython-cc18a8b78ac85159dad8f2f3ee93799f5df6fa82.tar.bz2 |
[3.12] gh-105908: fix `barry_as_FLUFL` future import (GH-105909) (#105930)
(cherry picked from commit 28187a9c4f95affe50fd37e0db0db177e2b9c2e9)
Co-authored-by: Crowthebird <78076854+thatbirdguythatuknownot@users.noreply.github.com>
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_future.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_future.py b/Lib/test/test_future.py index b8b591a..4730bfa 100644 --- a/Lib/test/test_future.py +++ b/Lib/test/test_future.py @@ -4,6 +4,7 @@ import __future__ import ast import unittest from test.support import import_helper +from test.support.script_helper import spawn_python, kill_python from textwrap import dedent import os import re @@ -121,6 +122,13 @@ class FutureTest(unittest.TestCase): exec("from __future__ import unicode_literals; x = ''", {}, scope) self.assertIsInstance(scope["x"], str) + def test_syntactical_future_repl(self): + p = spawn_python('-i') + p.stdin.write(b"from __future__ import barry_as_FLUFL\n") + p.stdin.write(b"2 <> 3\n") + out = kill_python(p) + self.assertNotIn(b'SyntaxError: invalid syntax', out) + class AnnotationsFutureTestCase(unittest.TestCase): template = dedent( """ |