From e96102b45b943bbd0d6a29e6617c14ef1ef0bd16 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Fri, 28 Oct 2011 19:42:48 -0400 Subject: [PATCH] bring is_integer into tested existence --- Lib/test/test_float.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Lib/test/test_float.py b/Lib/test/test_float.py index eb119ce6f0c..42463713cdc 100644 --- a/Lib/test/test_float.py +++ b/Lib/test/test_float.py @@ -164,6 +164,12 @@ class GeneralFloatCases(unittest.TestCase): self.assertAlmostEqual(float(FooUnicode('8')), 9.) self.assertAlmostEqual(float(FooStr('8')), 9.) + def test_is_integer(self): + self.assertFalse((1.1).is_integer()) + self.assertTrue((1.).is_integer()) + self.assertFalse(float("nan").is_integer()) + self.assertFalse(float("inf").is_integer()) + def test_floatasratio(self): for f, ratio in [ (0.875, (7, 8)),