MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_discard

Method test_discard

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

Source from the content-addressed store, hash-verified

1022 eq_(f1.data, {1, 3})
1023
1024 def test_discard(self):
1025 sess = fixture_session()
1026
1027 f1 = Foo(data={1, 2, 3})
1028 sess.add(f1)
1029 sess.commit()
1030
1031 f1.data.discard(2)
1032 sess.commit()
1033
1034 eq_(f1.data, {1, 3})
1035
1036 f1.data.discard(2)
1037 sess.commit()
1038
1039 eq_(f1.data, {1, 3})
1040
1041 def test_pickle_parent(self):
1042 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
discardMethod · 0.45

Tested by

no test coverage detected