8000 gh-116860: Remove outdated `test_parserhack` from `test_future` (GH-1… · miss-islington/cpython@6671dcd · GitHub
[go: up one dir, main page]

Skip to content

Commit 6671dcd

Browse files
sobolevnmiss-islington
authored andcommitted
< 8000 /div>
pythongh-116860: Remove outdated test_parserhack from test_future (pythonGH-116861)
(cherry picked from commit 669175b) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
1 parent 8fb4854 commit 6671dcd

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
@@ -107,26 +107,6 @@ def test_ensure_flags_dont_clash(self):
107107
}
108108
self.assertCountEqual(set(flags.values()), flags.values())
109109

110-
def test_parserhack(self):
111-
# test that the parser.c::future_hack function works as expected
112-
# Note: although this test must pass, it's not testing the original
113-
# bug as of 2.6 since the with statement is not optional and
114-
# the parser hack disabled. If a new keyword is introduced in
115-
# 2.6, change this to refer to the new future import.
116-
try:
117-
exec("from __future__ import print_function; print 0")
118-
except SyntaxError:
119-
pass
120-
else:
121-
self.fail("syntax error didn't occur")
122-
123-
try:
124-
exec("from __future__ import (print_function); print 0")
125-
except SyntaxError:
126-
pass
127-
else:
128-
self.fail("syntax error didn't occur")
129-
130110
def test_unicode_literals_exec(self):
131111
scope = {}
132112
exec("from __future__ import unicode_literals; x = ''", {}, scope)

0 commit comments

Comments
 (0)
0