/external/fonttools/Tests/misc/ |
D | py23_test.py | 90 self.assertAlmostEqual(round2(0.125, 2), 0.13) 91 self.assertAlmostEqual(round2(0.375, 2), 0.38) 92 self.assertAlmostEqual(round2(0.625, 2), 0.63) 93 self.assertAlmostEqual(round2(0.875, 2), 0.88) 94 self.assertAlmostEqual(round2(-0.125, 2), -0.13) 95 self.assertAlmostEqual(round2(-0.375, 2), -0.38) 96 self.assertAlmostEqual(round2(-0.625, 2), -0.63) 97 self.assertAlmostEqual(round2(-0.875, 2), -0.88) 99 self.assertAlmostEqual(round2(0.25, 1), 0.3) 100 self.assertAlmostEqual(round2(0.75, 1), 0.8) [all …]
|
D | fixedTools_test.py | 20 self.assertAlmostEqual(0.7999878, fixedToFloat(13107, 14)) 24 self.assertAlmostEqual(0.999939, fixedToFloat(16383, 14)) 25 self.assertAlmostEqual(-0.999939, fixedToFloat(-16383, 14)) 28 self.assertAlmostEqual(-9.984375, fixedToFloat(-639, 6)) 29 self.assertAlmostEqual(-10.0, fixedToFloat(-640, 6)) 30 self.assertAlmostEqual(9.984375, fixedToFloat(639, 6)) 31 self.assertAlmostEqual(10.0, fixedToFloat(640, 6)) 42 self.assertAlmostEqual('-9.98', fixedToStr(-639, 6)) 43 self.assertAlmostEqual('-10.0', fixedToStr(-640, 6)) 44 self.assertAlmostEqual('9.98', fixedToStr(639, 6)) [all …]
|
/external/python/cpython2/Lib/test/ |
D | test_complex.py | 20 def assertAlmostEqual(self, a, b): member in ComplexTest 23 unittest.TestCase.assertAlmostEqual(self, a.real, b.real) 24 unittest.TestCase.assertAlmostEqual(self, a.imag, b.imag) 26 unittest.TestCase.assertAlmostEqual(self, a.real, b) 27 unittest.TestCase.assertAlmostEqual(self, a.imag, 0.) 30 unittest.TestCase.assertAlmostEqual(self, a, b.real) 31 unittest.TestCase.assertAlmostEqual(self, 0., b.imag) 33 unittest.TestCase.assertAlmostEqual(self, a, b) 115 self.assertAlmostEqual(complex.__truediv__(2+0j, 1+1j), 1-1j) 124 self.assertAlmostEqual(complex.__floordiv__(3+0j, 1.5+0j), 2) [all …]
|
D | test_turtle.py | 127 self.assertAlmostEqual( 205 self.assertAlmostEqual(answer, expected) 254 self.assertAlmostEqual(self.nav.xcor(), 100) 255 self.assertAlmostEqual(self.nav.ycor(), -100) 274 self.assertAlmostEqual(self.nav.xcor(), 100) 275 self.assertAlmostEqual(self.nav.ycor(), -100) 277 self.assertAlmostEqual(self.nav.xcor(), 0) 278 self.assertAlmostEqual(self.nav.ycor(), 0) 307 self.assertAlmostEqual(self.nav.distance(Vec2D(0,0)), expected) 311 self.assertAlmostEqual(self.nav.heading(), 90) [all …]
|
D | test_cmath.py | 117 self.assertAlmostEqual(cmath.pi, pi_expected, places=9, 119 self.assertAlmostEqual(cmath.e, e_expected, places=9, 398 self.assertAlmostEqual(phase(0), 0.) 399 self.assertAlmostEqual(phase(1.), 0.) 400 self.assertAlmostEqual(phase(-1.), pi) 401 self.assertAlmostEqual(phase(-1.+1E-300j), pi) 402 self.assertAlmostEqual(phase(-1.-1E-300j), -pi) 403 self.assertAlmostEqual(phase(1j), pi/2) 404 self.assertAlmostEqual(phase(-1j), -pi/2) 413 self.assertAlmostEqual(phase(complex(-INF, -0.0)), -pi) [all …]
|
D | test_float.py | 199 self.assertAlmostEqual(float(Foo0()), 42.) 200 self.assertAlmostEqual(float(Foo1()), 42.) 201 self.assertAlmostEqual(float(Foo2()), 42.) 202 self.assertAlmostEqual(float(Foo3(21)), 42.) 204 self.assertAlmostEqual(float(FooUnicode('8')), 9.) 205 self.assertAlmostEqual(float(FooStr('8')), 9.) 216 self.assertAlmostEqual(float(F()), 42.) 218 self.assertAlmostEqual(FloatSubclass(F()), 42.) 752 self.assertAlmostEqual(round(12.34, True), 12.3) 756 self.assertAlmostEqual(round(-0.123456, MyIndex()), -0.1235) [all …]
|
D | test_colorsys.py | 14 self.assertAlmostEqual(tr1[0], tr2[0]) 15 self.assertAlmostEqual(tr1[1], tr2[1]) 16 self.assertAlmostEqual(tr1[2], tr2[2])
|
D | test_difflib.py | 11 self.assertAlmostEqual(sm.ratio(), 0.995, places=3) 16 self.assertAlmostEqual(sm.ratio(), 0.995, places=3) 24 self.assertAlmostEqual(sm.ratio(), 0.994, places=3) 40 self.assertAlmostEqual(sm.ratio(), 0, places=3) 44 self.assertAlmostEqual(sm.ratio(), 0.9975, places=3)
|
/external/python/cpython3/Lib/test/ |
D | test_complex.py | 16 def assertAlmostEqual(self, a, b): member in ComplexTest 19 unittest.TestCase.assertAlmostEqual(self, a.real, b.real) 20 unittest.TestCase.assertAlmostEqual(self, a.imag, b.imag) 22 unittest.TestCase.assertAlmostEqual(self, a.real, b) 23 unittest.TestCase.assertAlmostEqual(self, a.imag, 0.) 26 unittest.TestCase.assertAlmostEqual(self, a, b.real) 27 unittest.TestCase.assertAlmostEqual(self, 0., b.imag) 29 unittest.TestCase.assertAlmostEqual(self, a, b) 105 self.assertAlmostEqual(complex.__truediv__(2+0j, 1+1j), 1-1j) 171 self.assertAlmostEqual(pow(1+1j, 0+0j), 1.0) [all …]
|
D | test_turtle.py | 127 self.assertAlmostEqual( 216 self.assertAlmostEqual(answer, expected) 272 self.assertAlmostEqual(self.nav.xcor(), 100) 273 self.assertAlmostEqual(self.nav.ycor(), -100) 292 self.assertAlmostEqual(self.nav.xcor(), 100) 293 self.assertAlmostEqual(self.nav.ycor(), -100) 295 self.assertAlmostEqual(self.nav.xcor(), 0) 296 self.assertAlmostEqual(self.nav.ycor(), 0) 325 self.assertAlmostEqual(self.nav.distance(Vec2D(0,0)), expected) 329 self.assertAlmostEqual(self.nav.heading(), 90) [all …]
|
D | test_cmath.py | 154 self.assertAlmostEqual(cmath.pi, pi_expected, places=9, 156 self.assertAlmostEqual(cmath.e, e_expected, places=9, 465 self.assertAlmostEqual(phase(0), 0.) 466 self.assertAlmostEqual(phase(1.), 0.) 467 self.assertAlmostEqual(phase(-1.), pi) 468 self.assertAlmostEqual(phase(-1.+1E-300j), pi) 469 self.assertAlmostEqual(phase(-1.-1E-300j), -pi) 470 self.assertAlmostEqual(phase(1j), pi/2) 471 self.assertAlmostEqual(phase(-1j), -pi/2) 480 self.assertAlmostEqual(phase(complex(-INF, -0.0)), -pi) [all …]
|
D | test_colorsys.py | 14 self.assertAlmostEqual(tr1[0], tr2[0]) 15 self.assertAlmostEqual(tr1[1], tr2[1]) 16 self.assertAlmostEqual(tr1[2], tr2[2])
|
/external/llvm-project/lldb/third_party/Python/module/unittest2/unittest2/test/ |
D | test_assertions.py | 9 self.assertAlmostEqual(1.00000001, 1.0) 12 self.assertAlmostEqual, 1.0000001, 1.0) 16 self.assertAlmostEqual(1.1, 1.0, places=0) 18 self.assertAlmostEqual, 1.1, 1.0, places=1) 20 self.assertAlmostEqual(0, .1 + .1j, places=0) 23 self.assertAlmostEqual, 0, .1 + .1j, places=1) 28 self.assertAlmostEqual(float('inf'), float('inf')) 34 self.assertAlmostEqual(x, x) 39 self.assertAlmostEqual(1.1, 1.0, delta=0.5) 40 self.assertAlmostEqual(1.0, 1.1, delta=0.5) [all …]
|
/external/tensorflow/tensorflow/python/keras/ |
D | losses_test.py | 318 self.assertAlmostEqual(self.evaluate(loss), 0.0, 3) 327 self.assertAlmostEqual(self.evaluate(loss), 49.5, 3) 336 self.assertAlmostEqual(self.evaluate(loss), 113.85, 3) 346 self.assertAlmostEqual(self.evaluate(loss), 767.8 / 6, 3) 370 self.assertAlmostEqual(self.evaluate(loss), 587 / 6, 3) 379 self.assertAlmostEqual(self.evaluate(loss), 0.0, 3) 408 self.assertAlmostEqual(self.evaluate(loss), 227.69998, 3) 424 self.assertAlmostEqual(self.evaluate(loss), 0.0, 3) 433 self.assertAlmostEqual(self.evaluate(loss), 5.5, 3) 442 self.assertAlmostEqual(self.evaluate(loss), 12.65, 3) [all …]
|
D | metrics_confusion_matrix_test.py | 368 self.assertAlmostEqual(0.5, self.evaluate(result)) 377 self.assertAlmostEqual(0, self.evaluate(result)) 391 self.assertAlmostEqual(expected_precision, self.evaluate(result)) 451 self.assertAlmostEqual(1. / 3, self.evaluate(result)) 471 self.assertAlmostEqual(expected_precision, self.evaluate(result)) 480 self.assertAlmostEqual(1, self.evaluate(result)) 481 self.assertAlmostEqual(1, self.evaluate(p_obj.true_positives)) 482 self.assertAlmostEqual(0, self.evaluate(p_obj.false_positives)) 487 self.assertAlmostEqual(1, self.evaluate(result)) 488 self.assertAlmostEqual(1, self.evaluate(p_obj.true_positives)) [all …]
|
D | metrics_test.py | 75 self.assertAlmostEqual(self.evaluate(m.result()), 106) 95 self.assertAlmostEqual(result, 52., 4) # 50 + 1 + 5 * 0.2 96 self.assertAlmostEqual(self.evaluate(m.total), 52., 4) 100 self.assertAlmostEqual(self.evaluate(result_t), 53.5, 1) # 52 + 0.5 + 1 101 self.assertAlmostEqual(self.evaluate(m.total), 53.5, 1) 105 self.assertAlmostEqual(self.evaluate(result_t), 55.5, 1) # 53.5 + 1 + 1 106 self.assertAlmostEqual(self.evaluate(m.total), 55.5, 1) 110 self.assertAlmostEqual(self.evaluate(result_t), 57.5, 2) # 55.5 + 1 + 1 111 self.assertAlmostEqual(self.evaluate(m.total), 57.5, 1) 117 self.assertAlmostEqual(result, 63.75, 2) [all …]
|
/external/python/cpython2/Lib/unittest/test/ |
D | test_assertions.py | 8 self.assertAlmostEqual(1.00000001, 1.0) 11 self.assertAlmostEqual, 1.0000001, 1.0) 15 self.assertAlmostEqual(1.1, 1.0, places=0) 17 self.assertAlmostEqual, 1.1, 1.0, places=1) 19 self.assertAlmostEqual(0, .1+.1j, places=0) 22 self.assertAlmostEqual, 0, .1+.1j, places=1) 26 self.assertAlmostEqual(float('inf'), float('inf')) 31 self.assertAlmostEqual(1.1, 1.0, delta=0.5) 32 self.assertAlmostEqual(1.0, 1.1, delta=0.5) 36 self.assertAlmostEqual(1.0, 1.0, delta=0.5) [all …]
|
/external/tensorflow/tensorflow/python/kernel_tests/ |
D | losses_test.py | 58 self.assertAlmostEqual(0.0, self.evaluate(loss), 3) 63 self.assertAlmostEqual(5.5, self.evaluate(loss), 3) 69 self.assertAlmostEqual(5.5 * weights, self.evaluate(loss), 3) 76 self.assertAlmostEqual(5.5 * weights, self.evaluate(loss), 3) 82 self.assertAlmostEqual(5.6, self.evaluate(loss), 3) 88 self.assertAlmostEqual(5.6, self.evaluate(loss), 3) 94 self.assertAlmostEqual(16.6, self.evaluate(loss), 3) 100 self.assertAlmostEqual(6.0, self.evaluate(loss), 3) 106 self.assertAlmostEqual(0.0, self.evaluate(loss), 3) 135 self.assertAlmostEqual(self.evaluate(loss), 0.0, 3) [all …]
|
D | metrics_test.py | 214 self.assertAlmostEqual(1.65, self.evaluate(mean), 5) 231 self.assertAlmostEqual(0.5, self.evaluate(update_op), 5) 232 self.assertAlmostEqual(1.475, self.evaluate(update_op), 5) 233 self.assertAlmostEqual(12.4 / 6.0, self.evaluate(update_op), 5) 234 self.assertAlmostEqual(1.65, self.evaluate(update_op), 5) 236 self.assertAlmostEqual(1.65, self.evaluate(mean), 5) 267 self.assertAlmostEqual(expected, self.evaluate(update_op)) 268 self.assertAlmostEqual(expected, self.evaluate(mean)) 278 self.assertAlmostEqual(expected, self.evaluate(update_op), places=5) 279 self.assertAlmostEqual(expected, self.evaluate(mean), places=5) [all …]
|
/external/python/cpython3/Lib/unittest/test/ |
D | test_assertions.py | 10 self.assertAlmostEqual(1.00000001, 1.0) 13 self.assertAlmostEqual, 1.0000001, 1.0) 17 self.assertAlmostEqual(1.1, 1.0, places=0) 19 self.assertAlmostEqual, 1.1, 1.0, places=1) 21 self.assertAlmostEqual(0, .1+.1j, places=0) 24 self.assertAlmostEqual, 0, .1+.1j, places=1) 28 self.assertAlmostEqual(float('inf'), float('inf')) 33 self.assertAlmostEqual(1.1, 1.0, delta=0.5) 34 self.assertAlmostEqual(1.0, 1.1, delta=0.5) 38 self.assertAlmostEqual(1.0, 1.0, delta=0.5) [all …]
|
/external/autotest/client/bin/ |
D | utils_unittest.py | 100 self.assertAlmostEqual(usage, 0.25) 128 self.assertAlmostEqual(usage, 0) 135 self.assertAlmostEqual(utils.get_mem_total(), 2000) 142 self.assertAlmostEqual(utils.get_mem_free(), 300) 149 self.assertAlmostEqual(utils.get_mem_free_plus_buffers_and_cached(),
|
/external/tensorflow/tensorflow/python/keras/legacy_tf_layers/ |
D | normalization_test.py | 338 self.assertAlmostEqual(np.mean(normed_np_output), 0., places=1) 339 self.assertAlmostEqual(np.std(normed_np_output), 1., places=1) 356 self.assertAlmostEqual(np.mean(normed_np_output), 0., places=1) 357 self.assertAlmostEqual(np.std(normed_np_output), 1., places=1) 379 self.assertAlmostEqual(np.mean(normed_np_output), 0., places=1) 380 self.assertAlmostEqual(np.std(normed_np_output), 1., places=1) 397 self.assertAlmostEqual(np.mean(normed_np_output), 0., places=1) 398 self.assertAlmostEqual(np.std(normed_np_output), 1., places=1) 421 self.assertAlmostEqual(np.mean(normed_np_output), 0., places=1) 422 self.assertAlmostEqual(np.std(normed_np_output), 1., places=1) [all …]
|
/external/tensorflow/tensorflow/python/keras/mixed_precision/ |
D | autocast_variable_test.py | 231 self.assertAlmostEqual(8, self.evaluate(x + 1)) 232 self.assertAlmostEqual(10, self.evaluate(3 + x)) 233 self.assertAlmostEqual(14, self.evaluate(x + x)) 234 self.assertAlmostEqual(5, self.evaluate(x - 2)) 235 self.assertAlmostEqual(6, self.evaluate(13 - x)) 236 self.assertAlmostEqual(0, self.evaluate(x - x)) 237 self.assertAlmostEqual(14, self.evaluate(x * 2)) 238 self.assertAlmostEqual(21, self.evaluate(3 * x)) 239 self.assertAlmostEqual(49, self.evaluate(x * x)) 240 self.assertAlmostEqual(3.5, self.evaluate(x / 2)) [all …]
|
/external/python/cpython3/Lib/test/test_asyncio/ |
D | test_tasks.py | 580 self.assertAlmostEqual(10.0, when) 933 self.assertAlmostEqual(0.1, when) 935 self.assertAlmostEqual(0.2, when) 937 self.assertAlmostEqual(0.3, when) 959 self.assertAlmostEqual(0.3, loop.time()) 976 self.assertAlmostEqual(0, when) 987 self.assertAlmostEqual(0, loop.time()) 992 self.assertAlmostEqual(0, when) 1005 self.assertAlmostEqual(0, loop.time()) 1011 self.assertAlmostEqual(0.2, when) [all …]
|
D | test_queues.py | 31 self.assertAlmostEqual(0.1, when) 33 self.assertAlmostEqual(0.2, when) 127 self.assertAlmostEqual(0.01, when) 129 self.assertAlmostEqual(0.02, when) 163 self.assertAlmostEqual(0.02, loop.time()) 196 self.assertAlmostEqual(0.01, when) 224 self.assertAlmostEqual(0.01, loop.time()) 241 self.assertAlmostEqual(0.01, when) 243 self.assertAlmostEqual(0.061, when) 261 self.assertAlmostEqual(0.06, loop.time()) [all …]
|