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

Method test_pop

test/ext/test_mutable.py:359–371  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

357 eq_(f1.data, {"a": "z"})
358
359 def test_pop(self):
360 sess = fixture_session()
361
362 f1 = Foo(data={"a": "b", "c": "d"})
363 sess.add(f1)
364 sess.commit()
365
366 eq_(f1.data.pop("a"), "b")
367 sess.commit()
368
369 assert_raises(KeyError, f1.data.pop, "g")
370
371 eq_(f1.data, {"c": "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