From aefe6af18f9698bb6158545d7aa55853b154a238 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Tue, 27 Oct 2009 20:17:03 +0000 Subject: [PATCH] Merged revisions 75855 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r75855 | antoine.pitrou | 2009-10-27 21:14:04 +0100 (mar., 27 oct. 2009) | 3 lines Fix transient refleaks in test_urllib2_localnet. ........ --- 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 365742c8bf..87b66513d0 100644 --- a/Lib/test/test_urllib2_localnet.py +++ b/Lib/test/test_urllib2_localnet.py @@ -221,7 +221,15 @@ class FakeProxyHandler(http.server.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" @@ -329,7 +337,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.50.1