@testing.requires.predictable_gc
    def test_state_gc(self):

        class Foo(object):
            pass

        instrumentation.register_class(Foo)
        f = Foo()
        state = attributes.instance_state(f)
        f.bar = "foo"
        eq_(state.dict, {'bar': 'foo', state.manager.STATE_ATTR: state})
        del f
        gc_collect()
        assert state.obj() is None
        assert state.dict == {}
test that InstanceState always has a dict, even after host
dataset/ETHPy150Open zzzeek/sqlalchemy/test/orm/test_attributes.py/AttributesTest.test_state_gc