diff --git a/Lib/test/test_urllib2_localnet.py b/Lib/test/test_urllib2_localnet.py index 365742c8bff..87b66513d09 100644 --- a/Lib/test/test_urllib2_localnet.py +++ b/Lib/test/test_urllib2_localnet.py @@ -221,7 +221,15 @@ def do_GET(self): # 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 log_message(self, *args): 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