MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_pickle_parent

Method test_pickle_parent

test/ext/test_mutable.py:461–475  ·  test/ext/test_mutable.py::_MutableDictTestBase.test_pickle_parent
(self)

Source from the content-addressed store, hash-verified

459 eq_(f1.data, {class="st">"a": class="st">"b", class="st">"b": class="st">"c"})
460
461 def test_pickle_parent(self):
462 sess = fixture_session()
463
464 f1 = Foo(data={class="st">"a": class="st">"b"})
465 sess.add(f1)
466 sess.commit()
467 f1.data
468 sess.close()
469
470 for loads, dumps in picklers():
471 sess = fixture_session()
472 f2 = loads(dumps(f1))
473 sess.add(f2)
474 f2.data[class="st">"a"] = class="st">"c"
475 assert f2 in sess.dirty
476
477 def test_unrelated_flush(self):
478 sess = fixture_session()

Callers

nothing calls this directly

Calls 8

fixture_sessionFunction · 0.90
picklersFunction · 0.90
loadsFunction · 0.85
dumpsFunction · 0.85
FooClass · 0.70
addMethod · 0.45
commitMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected