(self)
| 362 | self.assertEqual(id(obj), id_L) |
| 363 | |
| 364 | def test_del(self): |
| 365 | # __del__ methods can trigger collection, make this to happen |
| 366 | thresholds = gc.get_threshold() |
| 367 | gc.enable() |
| 368 | gc.set_threshold(1) |
| 369 | |
| 370 | class A: |
| 371 | def __del__(self): |
| 372 | dir(self) |
| 373 | a = A() |
| 374 | del a |
| 375 | |
| 376 | gc.disable() |
| 377 | gc.set_threshold(*thresholds) |
| 378 | |
| 379 | def test_del_newclass(self): |
| 380 | # __del__ methods can trigger collection, make this to happen |