diff options
Diffstat (limited to 'Lib/test/test___future__.py')
-rw-r--r-- | Lib/test/test___future__.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/test/test___future__.py b/Lib/test/test___future__.py index 50a2c74ad0..1d8f8e6852 100644 --- a/Lib/test/test___future__.py +++ b/Lib/test/test___future__.py @@ -15,7 +15,7 @@ class FutureTest(unittest.TestCase): for name in dir(__future__): obj = getattr(__future__, name, None) if obj is not None and isinstance(obj, __future__._Feature): - self.assert_( + self.assertTrue( name in given_feature_names, "%r should have been in all_feature_names" % name ) @@ -30,7 +30,7 @@ class FutureTest(unittest.TestCase): optional = value.getOptionalRelease() mandatory = value.getMandatoryRelease() - a = self.assert_ + a = self.assertTrue e = self.assertEqual def check(t, name): a(isinstance(t, tuple), "%s isn't tuple" % name) @@ -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) |