This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ocean-city
Recipients
Date 2007-06-19.01:13:32
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Umm, maybe still not enough? applied this patch (fix for 3 str leaks) test_urllib2_localnet.py  still reports leaks sometimes.

Index: Lib/test/test_urllib2_localnet.py
===================================================================
--- Lib/test/test_urllib2_localnet.py	(revision 56002)
+++ Lib/test/test_urllib2_localnet.py	(working copy)
@@ -208,7 +208,7 @@
     testing.
     """
 
-    digest_auth_handler = DigestAuthHandler()
+    digest_auth_handler = None
 
     def log_message(self, format, *args):
         # Uncomment the next line for debugging.
@@ -240,6 +240,7 @@
     PROXY_URL = "http://127.0.0.1:%d" % PORT
 
     def setUp(self):
+        FakeProxyHandler.digest_auth_handler = DigestAuthHandler()
         FakeProxyHandler.digest_auth_handler.set_users({
             self.USER : self.PASSWD
             })
@@ -257,6 +258,7 @@
 
     def tearDown(self):
         self.server.stop()
+        FakeProxyHandler.digest_auth_handler = None
 
     def test_proxy_with_bad_password_raises_httperror(self):
         self._digest_auth_handler.add_password(self.REALM, self.URL,

///////////////////////////

test_urllib2_localnet leaked [2, 0, 0, 0] references, sum=2

# it is now rare case though....
History
Date User Action Args
2007-08-23 14:55:39adminlinkissue1739118 messages
2007-08-23 14:55:39admincreate