(self)
| 45 | class WeakSequenceTest(fixtures.TestBase): |
| 46 | @testing.requires.predictable_gc |
| 47 | def test_cleanout_elements(self): |
| 48 | class Foo: |
| 49 | pass |
| 50 | |
| 51 | f1, f2, f3 = Foo(), Foo(), Foo() |
| 52 | w = WeakSequence([f1, f2, f3]) |
| 53 | eq_(len(w), 3) |
| 54 | eq_(len(w._storage), 3) |
| 55 | del f2 |
| 56 | gc_collect() |
| 57 | eq_(len(w), 2) |
| 58 | eq_(len(w._storage), 2) |
| 59 | |
| 60 | @testing.requires.predictable_gc |
| 61 | def test_cleanout_appended(self): |
nothing calls this directly
no test coverage detected