#32417: LiveServerTestCase._tearDownClassInternal() has unneeded hasattr check
--------------------------------------+------------------------------------
Reporter: Chris Jerdonek | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Testing framework | Version: 2.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by Chris Jerdonek):
Looking at the history of why `_tearDownClassInternal()` is called rather
than `tearDownClass()`:
https://github.com/django/django/commit/73a610d2a81bc3bf2d3834786b2458bc85953ed0
it looks like the safer option might be to move the final two lines of
`LiveServerTestCase.tearDownClass()` into
`LiveServerTestCase._tearDownClassInternal()`, so that `LiveServerTestCase
.tearDownClass()` would become:
{{{#!python
@classmethod
def tearDownClass(cls):
cls._tearDownClassInternal()
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32417#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/067.78832f7515a9044f0a7d37ae52e7a40c%40djangoproject.com.