summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_urllib2_localnet.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2009-10-27 20:17:03 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2009-10-27 20:17:03 (GMT)
commitaefe6af18f9698bb6158545d7aa55853b154a238 (patch)
tree4861f2d7f9b5b9ef12878f138952f14c3dd572b1 /Lib/test/test_urllib2_localnet.py
parentb0e9bd4741fb3f00ef853ada1ba7e99f33d087f5 (diff)
downloadcpython-aefe6af18f9698bb6158545d7aa55853b154a238.zip
cpython-aefe6af18f9698bb6158545d7aa55853b154a238.tar.gz
cpython-aefe6af18f9698bb6158545d7aa55853b154a238.tar.bz2
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. ........
Diffstat (limited to 'Lib/test/test_urllib2_localnet.py')
-rw-r--r--Lib/test/test_urllib2_localnet.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/Lib/test/test_urllib2_localnet.py b/Lib/test/test_urllib2_localnet.py
index 365742c..87b6651 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