(self)
| 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: |
nothing calls this directly
no test coverage detected