Kaydet (Commit) b3b8ba61 authored tarafından Benjamin Peterson's avatar Benjamin Peterson

bring is_integer into tested existence

üst 5a8f03f6
......@@ -128,6 +128,12 @@ class GeneralFloatCases(unittest.TestCase):
self.assertRaises(TypeError, float, Foo4(42))
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)),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment