MCPcopy Create free account
hub / github.com/apache/qpid-proton-j / testFloat

Method testFloat

tests/python/proton_tests/codec.py:273–278  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

271 self._test("string", "one", "two", "three", "this is a test", "")
272
273 def testFloat(self):
274 # we have to use a special comparison here because python
275 # internaly only uses doubles and converting between floats and
276 # doubles is imprecise
277 self._test("float", 0, 1, 2, 3, 0.1, 0.2, 0.3, -1, -2, -3, -0.1, -0.2, -0.3,
278 eq=lambda x, y: x - y < 0.000001)
279
280 def testDouble(self):
281 self._test("double", 0, 1, 2, 3, 0.1, 0.2, 0.3, -1, -2, -3, -0.1, -0.2, -0.3)

Callers

nothing calls this directly

Calls 1

_testMethod · 0.95

Tested by

no test coverage detected