bpo-41984: GC track all user classes (GH-22701/GH-22702)

(cherry picked from commit c13b847a6f)
This commit is contained in:
Miss Skeleton (bot) 2020-10-14 20:38:25 -07:00 committed by GitHub
parent f07448bef4
commit d197b2bb3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 52 additions and 21 deletions

View file

@ -581,9 +581,9 @@ class GCTests(unittest.TestCase):
self.assertTrue(gc.is_tracked(UserInt()))
self.assertTrue(gc.is_tracked([]))
self.assertTrue(gc.is_tracked(set()))
self.assertFalse(gc.is_tracked(UserClassSlots()))
self.assertFalse(gc.is_tracked(UserFloatSlots()))
self.assertFalse(gc.is_tracked(UserIntSlots()))
self.assertTrue(gc.is_tracked(UserClassSlots()))
self.assertTrue(gc.is_tracked(UserFloatSlots()))
self.assertTrue(gc.is_tracked(UserIntSlots()))
def test_is_finalized(self):
# Objects not tracked by the always gc return false