8000 gh-116860: Remove outdated `test_parserhack` from `test_future` (#116… · python/cpython@669175b · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 669175b

Browse files
authored
gh-116860: Remove outdated test_parserhack from test_future (#116861)
1 parent b313cc6 commit 669175b

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

Lib/test/test_future_stmt/test_future.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -171,26 +171,6 @@ def test_ensure_flags_dont_clash(self):
171171
}
172172
self.assertCountEqual(set(flags.values()), flags.values())
173173

174-
def test_parserhack(self):
175-
# test that the parser.c::future_hack function works as expected
176-
# Note: although this test must pass, it's not testing the original
177-
# bug as of 2.6 since the with statement is not optional and
178-
# the parser hack disabled. If a new keyword is introduced in
179-
# 2.6, change this to refer to the new future import.
180-
try:
181-
exec("from __future__ import print_function; print 0")
182-
except SyntaxError:
183-
pass
184-
else:
185-
self.fail("syntax error didn't occur")
186-
187-
try:
188-
exec("from __future__ import (print_function); print 0")
189-
except SyntaxError:
190-
pass
191-
else:
192-
self.fail("syntax error didn't occur")
193-
194174
def test_unicode_literals_exec(self):
195175
scope = {}
196176
exec("from __future__ import unicode_literals; x = ''", {}, scope)

0 commit comments

Comments
 (0)
0