mirror of
https://github.com/django/django.git
synced 2025-07-07 19:29:12 +00:00
[4.0.x] Fixed thread termination in servers.tests.LiveServerPort on Python 3.10.9+.
Class cleanups registered in TestCase subclasses are no longer called
as TestCase.doClassCleanups() only cleans up the particular class, see
c2102136be
Backport of d02a9f0cee84e3d23f676bdf2ab6aadbf4a5bfe8 from main.
This commit is contained in:
parent
7522f5d05a
commit
d065944353
@ -364,6 +364,7 @@ class LiveServerPort(LiveServerBase):
|
|||||||
% self.live_server_url,
|
% self.live_server_url,
|
||||||
)
|
)
|
||||||
finally:
|
finally:
|
||||||
|
TestCase.doClassCleanups()
|
||||||
TestCase.tearDownClass()
|
TestCase.tearDownClass()
|
||||||
|
|
||||||
def test_specified_port_bind(self):
|
def test_specified_port_bind(self):
|
||||||
@ -383,6 +384,7 @@ class LiveServerPort(LiveServerBase):
|
|||||||
% TestCase.port,
|
% TestCase.port,
|
||||||
)
|
)
|
||||||
finally:
|
finally:
|
||||||
|
TestCase.doClassCleanups()
|
||||||
TestCase.tearDownClass()
|
TestCase.tearDownClass()
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user