MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_pop_default_none

Method test_pop_default_none

test/ext/test_mutable.py:386–397  ·  test/ext/test_mutable.py::_MutableDictTestBase.test_pop_default_none
(self)

Source from the content-addressed store, hash-verified

384 eq_(f1.data, {class="st">"c": class="st">"d"})
385
386 def test_pop_default_none(self):
387 sess = fixture_session()
388
389 f1 = Foo(data={class="st">"a": class="st">"b", class="st">"c": class="st">"d"})
390 sess.add(f1)
391 sess.commit()
392
393 eq_(f1.data.pop(class="st">"a", None), class="st">"b")
394 eq_(f1.data.pop(class="st">"a", None), None)
395 sess.commit()
396
397 eq_(f1.data, {class="st">"c": class="st">"d"})
398
399 def test_popitem(self):
400 sess = fixture_session()

Callers

nothing calls this directly

Calls 6

fixture_sessionFunction · 0.90
eq_Function · 0.90
FooClass · 0.70
addMethod · 0.45
commitMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected