MCPcopy Index your code
hub / github.com/python/cpython / test_is_integer

Method test_is_integer

Lib/test/test_float.py:316–320  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

314 self.test_from_number(FloatSubclass)
315
316 def test_is_integer(self):
317 self.assertFalse((1.1).is_integer())
318 self.assertTrue((1.).is_integer())
319 self.assertFalse(float("nan").is_integer())
320 self.assertFalse(float("inf").is_integer())
321
322 def test_floatasratio(self):
323 for f, ratio in [

Callers

nothing calls this directly

Calls 3

assertFalseMethod · 0.80
is_integerMethod · 0.80
assertTrueMethod · 0.80

Tested by

no test coverage detected