Pablo Galindo Salgado <pablog...@gmail.com> added the comment:
It seems that some collection from some other test is happening between the three calls to get_objects: self.assertIn(l, gc.get_objects(generation=0)) self.assertNotIn(l, gc.get_objects(generation=1)) self.assertNotIn(l, gc.get_objects(generation=2)) The easiest solution is deactivating the gc at the beginning of the test and reactivating it afterwards, as the test is relying on manual collection. In this way, external collections cannot affect the test. I will prepare a PR. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36155> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com