]> granicus.if.org Git - python/commitdiff
Merged revisions 87895 via svnmerge from
authorBenjamin Peterson <benjamin@python.org>
Wed, 12 Jan 2011 19:27:17 +0000 (19:27 +0000)
committerBenjamin Peterson <benjamin@python.org>
Wed, 12 Jan 2011 19:27:17 +0000 (19:27 +0000)
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87895 | lukasz.langa | 2011-01-09 12:18:53 -0600 (Sun, 09 Jan 2011) | 5 lines

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

  Patch by Adreas Stührk.
........

Lib/test/test_urllib2.py

index b74320d2accf2305de56908f56d86c51f07ab364..789dcd3442236f8317b16399ad4c38c5fea50ba0 100644 (file)
@@ -748,7 +748,7 @@ class HandlerTests(unittest.TestCase):
             else:
                 self.assertTrue(o.req is req)
                 self.assertEqual(req.type, "ftp")
-            self.assertEqual(req.type is "ftp", ftp)
+            self.assertEqual(req.type == "ftp", ftp)
 
     def test_http(self):