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

Method check

Lib/test/test_complex.py:248–253  ·  view source on GitHub ↗
(n, deltas, is_equal, imag = 0.0)

Source from the content-addressed store, hash-verified

246
247 def test_richcompare_boundaries(self):
248 def check(n, deltas, is_equal, imag = 0.0):
249 for delta in deltas:
250 i = n + delta
251 z = complex(i, imag)
252 self.assertIs(complex.__eq__(z, i), is_equal(delta))
253 self.assertIs(complex.__ne__(z, i), not is_equal(delta))
254 # For IEEE-754 doubles the following should hold:
255 # x in [2 ** (52 + i), 2 ** (53 + i + 1)] -> x mod 2 ** i == 0
256 # where the interval is representable, of course.

Callers

nothing calls this directly

Calls 4

assertIsMethod · 0.45
__eq__Method · 0.45
__ne__Method · 0.45

Tested by

no test coverage detected