Home
last modified time | relevance | path

Searched refs:MyDecimal (Results 1 – 3 of 3) sorted by relevance

/external/python/cpython2/Lib/test/
Dtest_decimal.py1610 class MyDecimal(Decimal): class
1613 d1 = MyDecimal(1)
1614 d2 = MyDecimal(2)
1722 class MyDecimal(Decimal): class
1725 r = MyDecimal.from_float(0.1)
1726 self.assertEqual(type(r), MyDecimal)
1730 self.assertEqual(MyDecimal.from_float(bigint), MyDecimal(bigint))
1731 self.assertTrue(MyDecimal.from_float(float('nan')).is_qnan())
1732 self.assertTrue(MyDecimal.from_float(float('inf')).is_infinite())
1733 self.assertTrue(MyDecimal.from_float(float('-inf')).is_infinite())
[all …]
/external/python/cpython3/Lib/test/
Dtest_statistics.py725 class MyDecimal(Decimal): class
728 for type_ in (float, MyFloat, Decimal, MyDecimal):
748 class MyDecimal(Decimal): class
750 for nan in (NAN, MyDecimal(NAN), sNAN, MyDecimal(sNAN)):
968 class MyDecimal(Decimal): class
971 x = statistics._convert(Fraction(-15, 16), MyDecimal)
972 self.check_exact_equal(x, MyDecimal("-0.9375"))
Dtest_decimal.py2104 class MyDecimal(Decimal): class
2107 d1 = MyDecimal(1)
2108 d2 = MyDecimal(2)
2116 self.assertIs(type(d), MyDecimal)
2120 self.assertIs(type(d), MyDecimal)
2130 m = MyDecimal(d)
2131 self.assertIs(type(m), MyDecimal)
2142 x = MyDecimal(m)
2143 self.assertIs(type(x), MyDecimal)
2543 class MyDecimal(Decimal): class
[all …]