MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_to_sci_string

Method test_to_sci_string

Lib/test/test_decimal.py:3675–3682  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3673 self.assertRaises(TypeError, c.to_eng_string, '10')
3674
3675 def test_to_sci_string(self):
3676 Decimal = self.decimal.Decimal
3677 Context = self.decimal.Context
3678
3679 c = Context()
3680 d = c.to_sci_string(Decimal(10))
3681 self.assertEqual(c.to_sci_string(10), d)
3682 self.assertRaises(TypeError, c.to_sci_string, '10')
3683
3684 def test_to_integral_exact(self):
3685 Decimal = self.decimal.Decimal

Callers

nothing calls this directly

Calls 5

to_sci_stringMethod · 0.95
DecimalClass · 0.85
ContextClass · 0.70
assertEqualMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected