]> granicus.if.org Git - python/commitdiff
#17564: skip test_bad_address unless the tests are run with -unetwork/-uall.
authorEzio Melotti <ezio.melotti@gmail.com>
Fri, 29 Mar 2013 23:32:45 +0000 (01:32 +0200)
committerEzio Melotti <ezio.melotti@gmail.com>
Fri, 29 Mar 2013 23:32:45 +0000 (01:32 +0200)
Lib/test/test_urllib2_localnet.py

index ec3437597d869b8fc1e923eb6ed85721ccb39949..0802f69dc80f8a9183bc440d55f3d9205aaa9a8b 100644 (file)
@@ -489,6 +489,11 @@ class TestUrlopen(BaseTestCase):
     def test_bad_address(self):
         # Make sure proper exception is raised when connecting to a bogus
         # address.
+
+        # as indicated by the comment below, this might fail with some ISP,
+        # so we run the test only when -unetwork/-uall is specified to
+        # mitigate the problem a bit (see #17564)
+        test_support.requires('network')
         self.assertRaises(IOError,
                           # Given that both VeriSign and various ISPs have in
                           # the past or are presently hijacking various invalid