> > Would we need to run “gc.collect” after each test to make it deterministic? >
Not particularly. In CPython, most objects are deterministically deleted when they go out of scope. Only circular references are gathered by the garbage collector, and I think it's okay to leave them as-is - the exception should be clear enough to debug such rare occurences. I finally created a ticket for this, linking to the pytest reference implementation: https://code.djangoproject.com/ticket/32557 I also created a ticket for a similar feature, tracking exceptions in threads that aren't picked up by the main thread: https://code.djangoproject.com/ticket/32558 On Sat, 31 Oct 2020 at 08:22, Carlton Gibson <carlton.gib...@gmail.com> wrote: > > > On 30 Oct 2020, at 17:29, Adam Johnson <m...@adamj.eu> wrote: > > Focussing only on the asyncio case may be counter productive. They are > warnings by default and it requires a warning filter to convert them to > exceptions, which are then unraisable. > > > OK, makes sense. Thanks for explaining it. Given that, seems worth a try > yes. +1 > > -- > You received this message because you are subscribed to the Google Groups > "Django developers (Contributions to Django itself)" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-developers+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-developers/351D56E9-B52D-4F3A-9CCE-072C206FEA96%40gmail.com > <https://groups.google.com/d/msgid/django-developers/351D56E9-B52D-4F3A-9CCE-072C206FEA96%40gmail.com?utm_medium=email&utm_source=footer> > . > -- Adam -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAMyDDM3_-7bhW6e7e0utM1Pi95RXdfkAE01zFghv-D4f%3DtBwrA%40mail.gmail.com.