[Python-checkins] r87895 - python/branches/py3k/Lib/test/test_urllib2.py

lukasz.langa python-checkins at python.org
Sun Jan 9 19:18:53 CET 2011


Author: lukasz.langa
Date: Sun Jan  9 19:18:53 2011
New Revision: 87895

Log:
#10874: test_urllib2 shouldn't use `is` operator for comparing strings

Patch by Adreas Stührk.



Modified:
   python/branches/py3k/Lib/test/test_urllib2.py

Modified: python/branches/py3k/Lib/test/test_urllib2.py
==============================================================================
--- python/branches/py3k/Lib/test/test_urllib2.py	(original)
+++ python/branches/py3k/Lib/test/test_urllib2.py	Sun Jan  9 19:18:53 2011
@@ -758,7 +758,7 @@
             else:
                 self.assertIs(o.req, req)
                 self.assertEqual(req.type, "ftp")
-            self.assertEqual(req.type is "ftp", ftp)
+            self.assertEqual(req.type == "ftp", ftp)
 
     def test_http(self):
 


More information about the Python-checkins mailing list