MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_scalar_del_expired

Method test_scalar_del_expired

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

Source from the content-addressed store, hash-verified

1956 eq_(self._someattr_history(f), ((), (), [5]))
1957
1958 def test_scalar_del_expired(self):
1959 # note - compare:
1960 # test_scalar_set_None,
1961 # test_scalar_get_first_set_None,
1962 # test_use_object_set_None,
1963 # test_use_object_get_first_set_None
1964 Foo = self._fixture(
1965 uselist=False, useobject=False, active_history=False
1966 )
1967 f = Foo()
1968 f.someattr = 5
1969 self._commit_someattr(f)
1970
1971 attributes.instance_state(f)._expire_attributes(
1972 attributes.instance_dict(f), ["someattr"]
1973 )
1974 del f.someattr
1975 eq_(self._someattr_history(f), ([None], (), ()))
1976
1977 def test_scalar_get_first_set_None(self):
1978 # note - compare:

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected