◐ Shell
clean mode source ↗

[3.6] bpo-31234: Fix dangling thread in test_ftp/poplib by vstinner · Pull Request #3554 · python/cpython

Expand Up @@ -470,6 +470,9 @@ def setUp(self): def tearDown(self): self.client.close() self.server.stop() # Explicitly clear the attribute to prevent dangling thread self.server = None asyncore.close_all(ignore_all=True)
def check_data(self, received, expected): self.assertEqual(len(received), len(expected)) Expand Down Expand Up @@ -799,6 +802,9 @@ def setUp(self): def tearDown(self): self.client.close() self.server.stop() # Explicitly clear the attribute to prevent dangling thread self.server = None asyncore.close_all(ignore_all=True)
def test_af(self): self.assertEqual(self.client.af, socket.AF_INET6) Expand Down Expand Up @@ -857,6 +863,9 @@ def setUp(self): def tearDown(self): self.client.close() self.server.stop() # Explicitly clear the attribute to prevent dangling thread self.server = None asyncore.close_all(ignore_all=True)
def test_control_connection(self): self.assertNotIsInstance(self.client.sock, ssl.SSLSocket) Expand Down Expand Up @@ -979,6 +988,8 @@ def setUp(self): def tearDown(self): ftplib.FTP.port = self.old_port self.server_thread.join() # Explicitly clear the attribute to prevent dangling thread self.server_thread = None
def server(self): # This method sets the evt 3 times: Expand Down