File tree
Lib/test/test_future_stmt
Original file line numberDiff line numberDiff line change@@ -171,26 +171,6 @@ def test_ensure_flags_dont_clash(self):
171171 }
172172self.assertCountEqual(set(flags.values()), flags.values())
173173174-deftest_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-exceptSyntaxError:
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-exceptSyntaxError:
190-pass
191-else:
192-self.fail("syntax error didn't occur")
193-194174deftest_unicode_literals_exec(self):
195175scope= {}
196176exec("from __future__ import unicode_literals; x = ''", {}, scope)