[Python-checkins] r79605 - python/branches/py3k/Lib/test/test_robotparser.py

antoine.pitrou python-checkins at python.org
Fri Apr 2 19:12:12 CEST 2010


Author: antoine.pitrou
Date: Fri Apr  2 19:12:12 2010
New Revision: 79605

Log:
Furniture is not very reliable these days (buildbot failures).



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

Modified: python/branches/py3k/Lib/test/test_robotparser.py
==============================================================================
--- python/branches/py3k/Lib/test/test_robotparser.py	(original)
+++ python/branches/py3k/Lib/test/test_robotparser.py	Fri Apr  2 19:12:12 2010
@@ -1,6 +1,7 @@
 import io
 import unittest
 import urllib.robotparser
+from urllib.error import URLError
 from test import support
 
 class RobotTestCase(unittest.TestCase):
@@ -214,8 +215,11 @@
         url = 'http://mueblesmoraleda.com'
         parser = urllib.robotparser.RobotFileParser()
         parser.set_url(url)
-        parser.read()
-        self.assertEqual(parser.can_fetch("*", url+"/robots.txt"), False)
+        try:
+            parser.read()
+            self.assertEqual(parser.can_fetch("*", url+"/robots.txt"), False)
+        except URLError:
+            self.skipTest('mueblesmoraleda.com is unavailable')
 
     def testPythonOrg(self):
         if not support.is_resource_enabled('network'):


More information about the Python-checkins mailing list