From 8a7d12e56a2deb10836c7edaf031e9ba31496920 Mon Sep 17 00:00:00 2001 From: "antoine.pitrou" Date: Tue, 27 Oct 2009 20:14:04 +0000 Subject: [PATCH] Fix transient refleaks in test_urllib2_localnet. git-svn-id: http://svn.python.org/projects/python/trunk@75855 6015fed2-1504-0410-9fe1-9d1591cc4771 --- Lib/test/test_urllib2_localnet.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_urllib2_localnet.py b/Lib/test/test_urllib2_localnet.py index ee19a4b38e..1375e112b8 100644 --- a/Lib/test/test_urllib2_localnet.py +++ b/Lib/test/test_urllib2_localnet.py @@ -220,7 +220,15 @@ class FakeProxyHandler(BaseHTTPServer.BaseHTTPRequestHandler): # Test cases -class ProxyAuthTests(unittest.TestCase): +class BaseTestCase(unittest.TestCase): + def setUp(self): + self._threads = test_support.threading_setup() + + def tearDown(self): + test_support.threading_cleanup(*self._threads) + + +class ProxyAuthTests(BaseTestCase): URL = "http://localhost" USER = "tester" @@ -327,7 +335,7 @@ def GetRequestHandler(responses): return FakeHTTPRequestHandler -class TestUrlopen(unittest.TestCase): +class TestUrlopen(BaseTestCase): """Tests urllib2.urlopen using the network. These tests are not exhaustive. Assuming that testing using files does a -- 2.11.4.GIT