[py-svn] r14779 - py/dist/py/documentation

hpk at codespeak.net hpk at codespeak.net
Tue Jul 19 18:22:22 CEST 2005


Author: hpk
Date: Tue Jul 19 18:22:12 2005
New Revision: 14779

Modified:
   py/dist/py/documentation/conftest.py
Log:
skip URL-checks if they result in a 401/403 error
(pointing to resources requiring permissions is basically
not an error)


Modified: py/dist/py/documentation/conftest.py
==============================================================================
--- py/dist/py/documentation/conftest.py	(original)
+++ py/dist/py/documentation/conftest.py	Tue Jul 19 18:22:12 2005
@@ -124,8 +124,11 @@
         print "trying remote", tryfn
         py.std.urllib2.urlopen(tryfn)
     except (py.std.urllib2.URLError, py.std.urllib2.HTTPError), e: 
-        py.test.fail("remote reference error %r in %s:%d\n%s" %(
-                      tryfn, path.basename, lineno+1, e))
+        if e.code in (401, 403): # authorization required, forbidden
+            py.test.skip("%s: %s" %(tryfn, str(e)))
+        else:
+            py.test.fail("remote reference error %r in %s:%d\n%s" %(
+                         tryfn, path.basename, lineno+1, e))
 
 def localrefcheck(tryfn, path, lineno): 
     # assume it should be a file 



More information about the pytest-commit mailing list