/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/test/ |
D | test_float.py | 12 INF = float("inf") 13 NAN = float("nan") 15 have_getformat = hasattr(float, "__getformat__") 18 requires_setformat = unittest.skipUnless(hasattr(float, "__setformat__"), 22 float.__getformat__("double").startswith("IEEE"), 32 self.assertEqual(float(3.14), 3.14) 33 self.assertEqual(float(314), 314.0) 34 self.assertEqual(float(314L), 314.0) 35 self.assertEqual(float(" 3.14 "), 3.14) 36 self.assertRaises(ValueError, float, " 0x3.1 ") [all …]
|
D | test_hash.py | 28 self.same_hash(int(1), long(1), float(1), complex(1), 29 int('1'), float('1.0')) 30 self.same_hash(int(-2**31), long(-2**31), float(-2**31)) 31 self.same_hash(int(1-2**31), long(1-2**31), float(1-2**31)) 32 self.same_hash(int(2**31-1), long(2**31-1), float(2**31-1)) 34 self.same_hash(int(2**31), long(2**31), float(2**31)) 35 self.same_hash(int(-2**63), long(-2**63), float(-2**63)) 38 self.same_hash(long(2**63), float(2**63)) 41 self.same_hash(long(1.23e300), float(1.23e300)) 42 self.same_hash(float(0.5), complex(0.5, 0.0))
|
D | test_int.py | 284 @unittest.skipUnless(float.__getformat__("double").startswith("IEEE"), 292 self.assertEqual(int(float(int(value))), value) 295 self.assertEqual(int(float(2**53+1)), 2**53) 296 self.assertEqual(int(float(2**53+2)), 2**53+2) 297 self.assertEqual(int(float(2**53+3)), 2**53+4) 298 self.assertEqual(int(float(2**53+5)), 2**53+4) 299 self.assertEqual(int(float(2**53+6)), 2**53+6) 300 self.assertEqual(int(float(2**53+7)), 2**53+8) 302 self.assertEqual(int(float(-2**53-1)), -2**53) 303 self.assertEqual(int(float(-2**53-2)), -2**53-2) [all …]
|
D | test_abstract_numbers.py | 30 self.assertFalse(issubclass(float, Rational)) 31 self.assertTrue(issubclass(float, Real)) 33 self.assertEqual(7.3, float(7.3).real) 34 self.assertEqual(0, float(7.3).imag) 35 self.assertEqual(7.3, float(7.3).conjugate()) 44 self.assertRaises(TypeError, float, c1)
|
D | test_fractions.py | 17 float.__getformat__("double").startswith("IEEE"), 24 if not isinstance(value, float): 157 self.assertRaises(TypeError, F, float('nan')) 158 self.assertRaises(TypeError, F, float('inf')) 159 self.assertRaises(TypeError, F, float('-inf')) 255 self.assertEqual(float(10**23), float(F.from_float(1e23))) 258 self.assertEqual(3.2, float(F.from_float(3.2))) 311 self.assertTypedEquals(0.1, float(F(1, 10))) 315 self.assertRaises(OverflowError, float, long('2'*400+'7')) 317 float(F(long('2'*400+'7'), long('3'*400+'1')))) [all …]
|
D | test_pow.py | 6 if type != float: 28 for othertype in int, long, float: 40 if type == float: 51 if type == float or j < 0: 66 self.powtest(float) 115 eq(pow(a, float(b)), b & 1 and -1.0 or 1.0) 117 fiveto = float(5 ** n)
|
D | test_long.py | 683 @unittest.skipUnless(float.__getformat__("double").startswith("IEEE"), 702 self.assertEqual(long(float(x)), x) 703 self.assertEqual(long(float(-x)), -x) 708 self.assertEqual(long(float(2L**p*(2**53+x))), 2L**p*(2**53+y)) 714 self.assertEqual(long(float(2L**p*(2**54+x))), 2L**p*(2**54+y)) 720 self.assertEqual(float(long_dbl_max), DBL_MAX) 721 self.assertEqual(float(long_dbl_max+1), DBL_MAX) 722 self.assertEqual(float(halfway-1), DBL_MAX) 723 self.assertRaises(OverflowError, float, halfway) 724 self.assertEqual(float(1-halfway), -DBL_MAX) [all …]
|
D | test_binop.py | 18 for T in int, long, float, complex: 64 return str(float(self)) 94 return float(self) + other 107 return float(self) - other 118 return other - float(self) 128 return float(self)*other 140 return float(self) / other 152 return other / float(self) 203 return float(self) == other
|
D | test_math.py | 13 NAN = float('nan') 14 INF = float('inf') 15 NINF = float('-inf') 19 float.__getformat__("double").startswith("IEEE"), 105 yield (id, fn, float(arg), float(exp), flags) 126 float(arg_real), float(arg_imag), 127 float(exp_real), float(exp_imag), 267 self.assertEqual(float, type(math.ceil(1))) 268 self.assertEqual(float, type(math.ceil(1L))) 269 self.assertEqual(float, type(math.ceil(1.0))) [all …]
|
D | test_format.py | 116 testboth("%d", float(big), "123456________________________", 6) 154 testboth("%x", float(big), "123456_______________", 6) 195 testboth("%o", float(big), "123456__________________________", 6) 225 testboth("%x", float(0x42), "42") 231 testboth("%o", float(042), "42")
|
D | test_typechecks.py | 36 self.assertEqual(Integer.__subclasscheck__(float), False) 41 self.assertEqual(issubclass(float, Integer), False) 42 self.assertEqual(issubclass(float, (Integer,)), False)
|
D | test_types.py | 49 self.assertRaises(ValueError, float, '') 50 self.assertRaises(ValueError, float, '5\0') 85 if float() != 0.0: self.fail('float() does not return 0.0') 90 if float(1) == 1.0 and float(-1) == -1.0 and float(0) == 0.0: pass 101 test(float('1.5e'+str(i)), '1.500000e{0:+03d}'.format(i)) 437 float(value).__format__(format_spec)) 546 float(value).__format__(format_spec)) 591 assert type(f) == float
|
D | test_fpformat.py | 27 expected = "%.*f" % (digits, float(n)) 35 expected = "%.*e" % (digits, float(n))
|
D | test__locale.py | 127 self.assertEqual(int(float('3.14') * 100), 314, 130 self.assertRaises(ValueError, float,
|
D | test_complex.py | 7 INF = float("inf") 8 NAN = float("nan") 87 simple_real = [float(i) for i in xrange(-5, 6)] 157 check(2 ** pow, range(1, 101), lambda delta: False, float(i)) 313 self.assertRaises(TypeError, float, 5+3j) 500 if float.__getformat__("double").startswith("IEEE"): 507 @unittest.skipUnless(float.__getformat__("double").startswith("IEEE"), 514 @unittest.skipUnless(float.__getformat__("double").startswith("IEEE"), 531 inf, nan = float('inf'), float('nan')
|
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.10/Lib/json/tests/ |
D | test_float.py | 9 self.assertEqual(float(self.dumps(num)), num) 21 self.assertEqual(self.loads('[23456789012E666]'), [float('inf')]) 22 self.assertEqual(self.loads('[-23456789012E666]'), [float('-inf')]) 25 for val in (float('inf'), float('-inf'), float('nan')):
|
D | test_decode.py | 14 rval = self.loads('1', parse_int=float) 15 self.assertTrue(isinstance(rval, float))
|
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/ |
D | fractions.py | 107 elif isinstance(numerator, float): 177 elif not isinstance(f, float): 363 elif isinstance(b, float): 364 return fallback_operator(float(a), b) 377 return fallback_operator(float(a), float(b)) 471 return float(a) ** float(b) 473 return float(a) ** b 487 return a ** float(b) 520 if self == float(self): 521 return hash(float(self)) [all …]
|
D | numbers.py | 251 return complex(float(self)) 267 Real.register(float) 378 return float(long(self))
|
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/json/ |
D | encoder.py | 31 INFINITY = float('1e66666') 272 float=float, 316 elif isinstance(value, float): 363 elif isinstance(key, float): 393 elif isinstance(value, float): 422 elif isinstance(o, float):
|
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.10/Lib/json/ |
D | encoder.py | 30 INFINITY = float('inf') 278 float=float, 322 elif isinstance(value, float): 369 elif isinstance(key, float): 399 elif isinstance(value, float): 428 elif isinstance(o, float):
|
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Tools/scripts/ |
D | byteyears.py | 54 byteyears = float(size) * float(age) / secs_per_year
|
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/unittest/test/ |
D | test_assertions.py | 26 self.assertAlmostEqual(float('inf'), float('inf')) 28 float('inf'), float('inf'))
|
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/json/tests/ |
D | test_decode.py | 14 rval = self.loads('1', parse_int=float) 15 self.assertTrue(isinstance(rval, float))
|
/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.10/Lib/ |
D | numbers.py | 251 return complex(float(self)) 267 Real.register(float) 378 return float(long(self))
|