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

Function test_pickle_hastraits

tests/test_traitlets.py:2307–2320  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2305
2306
2307def test_pickle_hastraits():
2308 c = Pickleable()
2309 for protocol in range(pickle.HIGHEST_PROTOCOL + 1):
2310 p = pickle.dumps(c, protocol)
2311 c2 = pickle.loads(p)
2312 assert c2.i == c.i
2313 assert c2.j == c.j
2314
2315 c.i = 5
2316 for protocol in range(pickle.HIGHEST_PROTOCOL + 1):
2317 p = pickle.dumps(c, protocol)
2318 c2 = pickle.loads(p)
2319 assert c2.i == c.i
2320 assert c2.j == c.j
2321
2322
2323def test_hold_trait_notifications():

Callers

nothing calls this directly

Calls 1

PickleableClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…