Hey guys i'm trying to solve bug https://code.djangoproject.com/ticket/29024 ,
the suggestion provided is that i use *addCleanup* inside *setUp* or use
*setUpClass* and *tearDownClass*.
I tried using *addCleanup* inside *setUp* function of *TestContextDecorator*
but as the class *TestContextDecorator* isn't a subclass of *TestCase* i'm
not able to use *addCleanup*.
Though using *addCleanup* inside of
*setUp* function of *Example2TestCase* given in the example code solves the
bug, but i don't that is the correct way to solve this bug.
What should i do here?
So far i have used *try* and *except* inside the *setUp* of
*TestContextDecorator* and that seems to solve the bug but i'm not sure if
its the best way to do it. Here are the changes i made
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 post to this group, send email to email@example.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit
For more options, visit https://groups.google.com/d/optout.