MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_cleanout_appended

Method test_cleanout_appended

test/base/test_utils.py:61–75  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

59
60 @testing.requires.predictable_gc
61 def test_cleanout_appended(self):
62 class Foo:
63 pass
64
65 f1, f2, f3 = Foo(), Foo(), Foo()
66 w = WeakSequence()
67 w.append(f1)
68 w.append(f2)
69 w.append(f3)
70 eq_(len(w), 3)
71 eq_(len(w._storage), 3)
72 del f2
73 gc_collect()
74 eq_(len(w), 2)
75 eq_(len(w._storage), 2)
76
77 def test_index_error(self):
78 class Foo:

Callers

nothing calls this directly

Calls 4

appendMethod · 0.95
WeakSequenceClass · 0.90
eq_Function · 0.90
FooClass · 0.70

Tested by

no test coverage detected