MCPcopy Index your code
hub / github.com/python/cpython / test__clamp

Method test__clamp

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

Source from the content-addressed store, hash-verified

3071 self.assertEqual(c.flags, d.flags)
3072
3073 def test__clamp(self):
3074 # In Python 3.2, the private attribute `_clamp` was made
3075 # public (issue 8540), with the old `_clamp` becoming a
3076 # property wrapping `clamp`. For the duration of Python 3.2
3077 # only, the attribute should be gettable/settable via both
3078 # `clamp` and `_clamp`; in Python 3.3, `_clamp` should be
3079 # removed.
3080 Context = self.decimal.Context
3081 c = Context()
3082 self.assertRaises(AttributeError, getattr, c, '_clamp')
3083
3084 def test_abs(self):
3085 Decimal = self.decimal.Decimal

Callers

nothing calls this directly

Calls 2

ContextClass · 0.70
assertRaisesMethod · 0.45

Tested by

no test coverage detected