(self)
| 381 | gc.set_threshold(*thresholds) |
| 382 | |
| 383 | def test_del_newclass(self): |
| 384 | # __del__ methods can trigger collection, make this to happen |
| 385 | thresholds = gc.get_threshold() |
| 386 | gc.enable() |
| 387 | gc.set_threshold(1) |
| 388 | |
| 389 | class A(object): |
| 390 | def __del__(self): |
| 391 | dir(self) |
| 392 | a = A() |
| 393 | del a |
| 394 | |
| 395 | gc.disable() |
| 396 | gc.set_threshold(*thresholds) |
| 397 | |
| 398 | # The following two tests are fragile: |
| 399 | # They precisely count the number of allocations, |
nothing calls this directly
no test coverage detected