1
0
mirror of https://github.com/django/django.git synced 2025-07-07 11:19: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:
Mariusz Felisiak 2023-01-12 06:04:10 +01:00
parent 7522f5d05a
commit d065944353

View File

@ -364,6 +364,7 @@ class LiveServerPort(LiveServerBase):
% self.live_server_url,
)
finally:
TestCase.doClassCleanups()
TestCase.tearDownClass()
def test_specified_port_bind(self):
@ -383,6 +384,7 @@ class LiveServerPort(LiveServerBase):
% TestCase.port,
)
finally:
TestCase.doClassCleanups()
TestCase.tearDownClass()