mirror of
https://github.com/python/cpython.git
synced 2026-01-24 16:18:45 +00:00
test that compile() accepts the future flag
This commit is contained in:
parent
fbba7cdcf0
commit
d3243d8db8
1 changed files with 3 additions and 0 deletions
|
|
@ -53,9 +53,12 @@ def check(t, name):
|
|||
|
||||
a(hasattr(value, "compiler_flag"),
|
||||
"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),
|
||||
".compiler_flag isn't int")
|
||||
|
||||
|
||||
def test_main():
|
||||
test_support.run_unittest(FutureTest)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue