MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_scalar_del

Method test_scalar_del

test/orm/test_attributes.py:1941–1956  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1939 eq_(self._someattr_history(f), ([None], (), ()))
1940
1941 def test_scalar_del(self):
1942 # note - compare:
1943 # test_scalar_set_None,
1944 # test_scalar_get_first_set_None,
1945 # test_use_object_set_None,
1946 # test_use_object_get_first_set_None
1947 Foo = self._fixture(
1948 uselist=False, useobject=False, active_history=False
1949 )
1950 f = Foo()
1951 f.someattr = 5
1952 attributes.instance_state(f).key = ("foo",)
1953 self._commit_someattr(f)
1954
1955 del f.someattr
1956 eq_(self._someattr_history(f), ((), (), [5]))
1957
1958 def test_scalar_del_expired(self):
1959 # note - compare:

Callers

nothing calls this directly

Calls 5

_fixtureMethod · 0.95
_commit_someattrMethod · 0.95
_someattr_historyMethod · 0.95
eq_Function · 0.90
FooClass · 0.70

Tested by

no test coverage detected