Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a8f03f commit b3b8ba6Copy full SHA for b3b8ba6
1 file changed
Lib/test/test_float.py
@@ -128,6 +128,12 @@ def __float__(self):
128
self.assertRaises(TypeError, float, Foo4(42))
129
self.assertAlmostEqual(float(FooStr('8')), 9.)
130
131
+ def test_is_integer(self):
132
+ self.assertFalse((1.1).is_integer())
133
+ self.assertTrue((1.).is_integer())
134
+ self.assertFalse(float("nan").is_integer())
135
+ self.assertFalse(float("inf").is_integer())
136
+
137
def test_floatasratio(self):
138
for f, ratio in [
139
(0.875, (7, 8)),
0 commit comments