diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2009-10-27 20:14:04 +0000 |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2009-10-27 20:14:04 +0000 |
commit | fce3207b53aa323044d2e8db3b0a2a4d4b7a7089 (patch) | |
tree | 79a1d196c20f260c2cc7432380acba54e10f4769 /Lib/test/test_urllib2_localnet.py | |
parent | bb0bb30acc1698a34573e4ebba46e1f53d61d35c (diff) | |
download | cpython-git-fce3207b53aa323044d2e8db3b0a2a4d4b7a7089.tar.gz |
Fix transient refleaks in test_urllib2_localnet.
Diffstat (limited to 'Lib/test/test_urllib2_localnet.py')
-rw-r--r-- | Lib/test/test_urllib2_localnet.py | 12 |
1 files 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 |