gjhiggins/rdflib — Issue #167: doctest failure
Author: gjhiggins
Created: 2011-10-19 01:34:32+00:00
State: open

Originally filed by gjhigg...@gmail.com on 2011-04-15T02:01:49

Doctest failure - linkrot

==================================================================
FAIL: Doctest: rdflib
----------------------------------------------------------------------
Traceback (most recent call last):
File "python2.6/lib/python2.6/doctest.py", line 2131, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for rdflib
File "rdflib/__init__.py", line 0, in rdflib

----------------------------------------------------------------------
File "rdflib/__init__.py", line 17, in rdflib
Failed example:
result = g.parse("http://eikeon.com/foaf.rdf")
Exception raised:
Traceback (most recent call last):
File "python2.6/lib/python2.6/doctest.py", line 1231, in __run
compileflags, 1) in test.globs
File "", line 1, in
result = g.parse("http://eikeon.com/foaf.rdf")
File "rdflib/graph.py", line 772, in parse
data=data, format=format)
File "rdflib/parser.py", line 157, in create_input_source
input_source = URLInputSource(absolute_location, format)
File "rdflib/parser.py", line 96, in __init__
raise Exception('"%s" while trying to open "%s"' % (e, self.url))
Exception: "HTTP Error 404: Not Found" while trying to open "http://eikeon.com/foaf.rdf"
----------------------------------------------------------------------
File "rdflib/__init__.py", line 19, in rdflib
Failed example:
print "graph has %s statements." % len(g)
Expected:
graph has 34 statements.
Got:
graph has 0 statements.

=================================================================

Replace "http://eikeon.com/foaf.rdf" with "http://www.w3.org/People/Berners-Lee/card" and amend expected len(g) from 34 to 78.