aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_socket.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_socket.py')
-rwxr-xr-xLib/test/test_socket.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index 613363722cf..1aaa9e44f90 100755
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -338,9 +338,7 @@ class ThreadableTest:
self.server_ready.set()
def _setUp(self):
- self.wait_threads = threading_helper.wait_threads_exit()
- self.wait_threads.__enter__()
- self.addCleanup(self.wait_threads.__exit__, None, None, None)
+ self.enterContext(threading_helper.wait_threads_exit())
self.server_ready = threading.Event()
self.client_ready = threading.Event()