mirror of https://github.com/python/cpython
test that compile() accepts the future flag
This commit is contained in:
parent
fbba7cdcf0
commit
d3243d8db8
|
@ -53,9 +53,12 @@ class FutureTest(unittest.TestCase):
|
||||||
|
|
||||||
a(hasattr(value, "compiler_flag"),
|
a(hasattr(value, "compiler_flag"),
|
||||||
"feature is missing a .compiler_flag attr")
|
"feature is missing a .compiler_flag attr")
|
||||||
|
# Make sure the compile accepts the flag.
|
||||||
|
compile("", "<test>", "exec", value.compiler_flag)
|
||||||
a(isinstance(getattr(value, "compiler_flag"), int),
|
a(isinstance(getattr(value, "compiler_flag"), int),
|
||||||
".compiler_flag isn't int")
|
".compiler_flag isn't int")
|
||||||
|
|
||||||
|
|
||||||
def test_main():
|
def test_main():
|
||||||
test_support.run_unittest(FutureTest)
|
test_support.run_unittest(FutureTest)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue