]> granicus.if.org Git - python/commitdiff
test that compile() accepts the future flag
authorBenjamin Peterson <benjamin@python.org>
Thu, 2 Jul 2009 21:38:36 +0000 (21:38 +0000)
committerBenjamin Peterson <benjamin@python.org>
Thu, 2 Jul 2009 21:38:36 +0000 (21:38 +0000)
Lib/test/test___future__.py

index a8c7c2e881ae09b8f6f0108648aa09ecc361e474..1d8f8e6852503264e96411d9e98be4e1875bfa07 100644 (file)
@@ -53,9 +53,12 @@ class FutureTest(unittest.TestCase):
 
             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)