@@ -169,7 +169,6 @@ def setUp(self):
169169 self .output = io .StringIO ()
170170 sys .stdout = self .output
171171
172- self ._threads = support .threading_setup ()
173172 self .serv_evt = threading .Event ()
174173 self .client_evt = threading .Event ()
175174 # Capture SMTPChannel debug output
@@ -194,7 +193,6 @@ def tearDown(self):
194193 # wait for the server thread to terminate
195194 self .serv_evt .wait ()
196195 self .thread .join ()
197- support .threading_cleanup (* self ._threads )
198196 # restore sys.stdout
199197 sys .stdout = self .old_stdout
200198 # restore DEBUGSTREAM
@@ -644,7 +642,6 @@ class SMTPSimTests(unittest.TestCase):
644642 def setUp (self ):
645643 self .real_getfqdn = socket .getfqdn
646644 socket .getfqdn = mock_socket .getfqdn
647- self ._threads = support .threading_setup ()
648645 self .serv_evt = threading .Event ()
649646 self .client_evt = threading .Event ()
650647 # Pick a random unused port by passing 0 for the port number
@@ -666,7 +663,6 @@ def tearDown(self):
666663 # wait for the server thread to terminate
667664 self .serv_evt .wait ()
668665 self .thread .join ()
669- support .threading_cleanup (* self ._threads )
670666
671667 def testBasic (self ):
672668 # smoke test
@@ -760,6 +756,7 @@ def testAUTH_CRAM_MD5(self):
760756 #test infrastructure can support it.
761757
762758
759+ @support .reap_threads
763760def test_main (verbose = None ):
764761 support .run_unittest (GeneralTests , DebuggingServerTests ,
765762 NonConnectingTests ,
0 commit comments