summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2023-01-12 06:04:10 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2023-02-02 07:16:47 +0100
commitd0659443537959e1b4498cc718a03b1cc7e4cc9b (patch)
tree31c43ee39942fd32badf9f0a8522af60b453cacb /tests
parent7522f5d05a6cccc5062f481fbba69b414e934eb2 (diff)
[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 https://github.com/python/cpython/commit/c2102136be569e6fc8ed90181f229b46d07142f8 Backport of d02a9f0cee84e3d23f676bdf2ab6aadbf4a5bfe8 from main.
Diffstat (limited to 'tests')
-rw-r--r--tests/servers/tests.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/servers/tests.py b/tests/servers/tests.py
index a54421fe78..03496c3d2a 100644
--- a/tests/servers/tests.py
+++ b/tests/servers/tests.py
@@ -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()