def test_flags_passed(self):
# The unicode literals flags has to be passed from the paser to AST
# generation.
suite = parser.suite("from __future__ import unicode_literals; x = ''")
code = suite.compile()
scope = {}
exec code in scope
self.assertIsInstance(scope["x"], unicode)
评论列表
文章目录