Lines Matching refs:from_decimal
277 self.assertRaises(TypeError, F.from_decimal, 3+4j)
278 self.assertEqual(F(10, 1), F.from_decimal(10))
279 self.assertEqual(F(0), F.from_decimal(Decimal("-0")))
280 self.assertEqual(F(5, 10), F.from_decimal(Decimal("0.5")))
281 self.assertEqual(F(5, 1000), F.from_decimal(Decimal("5e-3")))
282 self.assertEqual(F(5000), F.from_decimal(Decimal("5e3")))
284 F.from_decimal(Decimal("0." + "9" * 30)))
288 F.from_decimal, Decimal("inf"))
291 F.from_decimal, Decimal("-inf"))
294 F.from_decimal, Decimal("nan"))
297 F.from_decimal, Decimal("snan"))