MCPcopy Create free account
hub / github.com/ipython/traitlets / test_copy_HasTraits

Function test_copy_HasTraits

tests/test_traitlets.py:2887–2899  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2885
2886
2887def test_copy_HasTraits():
2888 from copy import copy
2889
2890 class C(HasTraits):
2891 a = Int()
2892
2893 c = C(a=1)
2894 assert c.a == 1
2895
2896 cc = copy(c)
2897 cc.a = 2
2898 assert cc.a == 2
2899 assert c.a == 1
2900
2901
2902def _from_string_test(traittype, s, expected):

Callers

nothing calls this directly

Calls 1

CClass · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…