summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_socket.py
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-06-18 19:35:01 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-06-18 19:35:01 (GMT)
commit9602cc2aa43e489a61df800013bc7767094ede91 (patch)
tree867065f44f023c9f1c26bcdafeec7107e8afffc7 /Lib/test/test_socket.py
parentf5da071ec8ec0b84acd8d1038e1c4b584158ff63 (diff)
downloadcpython-9602cc2aa43e489a61df800013bc7767094ede91.zip
cpython-9602cc2aa43e489a61df800013bc7767094ede91.tar.gz
cpython-9602cc2aa43e489a61df800013bc7767094ede91.tar.bz2
Prevent spurious leaks when running regrtest.py -R. There may be more
issues that crop up from time to time, but this change seems to have been pretty stable (no spurious warnings) for about a week. Other modules which use threads may require similar use of threading_setup/threading_cleanup from test_support.
Diffstat (limited to 'Lib/test/test_socket.py')
-rw-r--r--Lib/test/test_socket.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index e0aa58c..e773eab 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -906,7 +906,10 @@ def test_main():
tests.append(BasicSocketPairTest)
if sys.platform == 'linux2':
tests.append(TestLinuxAbstractNamespace)
+
+ thread_info = test_support.threading_setup()
test_support.run_unittest(*tests)
+ test_support.threading_cleanup(*thread_info)
if __name__ == "__main__":
test_main()