MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_pop

Method test_pop

test/ext/test_mutable.py:359–371  ·  test/ext/test_mutable.py::_MutableDictTestBase.test_pop
(self)

Source from the content-addressed store, hash-verified

357 eq_(f1.data, {class="st">"a": class="st">"z"})
358
359 def test_pop(self):
360 sess = fixture_session()
361
362 f1 = Foo(data={class="st">"a": class="st">"b", class="st">"c": class="st">"d"})
363 sess.add(f1)
364 sess.commit()
365
366 eq_(f1.data.pop(class="st">"a"), class="st">"b")
367 sess.commit()
368
369 assert_raises(KeyError, f1.data.pop, class="st">"g")
370
371 eq_(f1.data, {class="st">"c": class="st">"d"})
372
373 def test_pop_default(self):
374 sess = fixture_session()

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected