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

Method test_copy

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

Source from the content-addressed store, hash-verified

3061 self.assertNotIn(Decimal(10), ['a', 1.0, (1,2), {}])
3062
3063 def test_copy(self):
3064 # All copies should be deep
3065 Decimal = self.decimal.Decimal
3066 Context = self.decimal.Context
3067
3068 c = Context()
3069 d = c.copy()
3070 self.assertNotEqual(id(c), id(d))
3071 self.assertNotEqual(id(c.flags), id(d.flags))
3072 self.assertNotEqual(id(c.traps), id(d.traps))
3073 k1 = set(c.flags.keys())
3074 k2 = set(d.flags.keys())
3075 self.assertEqual(k1, k2)
3076 self.assertEqual(c.flags, d.flags)
3077
3078 def test__clamp(self):
3079 # In Python 3.2, the private attribute `_clamp` was made

Callers

nothing calls this directly

Calls 7

copyMethod · 0.95
idFunction · 0.85
setFunction · 0.85
assertNotEqualMethod · 0.80
ContextClass · 0.70
keysMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected