diff options
author | Benjamin Peterson <benjamin@python.org> | 2011-10-28 23:42:48 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2011-10-28 23:42:48 (GMT) |
commit | e96102b45b943bbd0d6a29e6617c14ef1ef0bd16 (patch) | |
tree | e24e2dc6f37246c46d1b4a929c8e170718586b5e /Lib | |
parent | bf0cafa773e704647986637af90f223841e9a74c (diff) | |
download | cpython-e96102b45b943bbd0d6a29e6617c14ef1ef0bd16.zip cpython-e96102b45b943bbd0d6a29e6617c14ef1ef0bd16.tar.gz cpython-e96102b45b943bbd0d6a29e6617c14ef1ef0bd16.tar.bz2 |
bring is_integer into tested existence
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_float.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_float.py b/Lib/test/test_float.py index eb119ce..4246371 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)), |