Skip to content

Commit

Permalink
remove bad doctest declarations that are no longer required, were cau…
Browse files Browse the repository at this point in the history
…sing subsequent tests to fail
  • Loading branch information
ashleysommer committed Jul 9, 2021
1 parent 5e4503e commit 2df55aa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
3 changes: 0 additions & 3 deletions rdflib/plugins/parsers/jsonld.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
Example usage::
>>> from rdflib.plugin import register, Parser
>>> register('json-ld', Parser, 'rdflib_jsonld.parser', 'JsonLDParser')
>>> from rdflib import Graph, URIRef, Literal
>>> test_json = '''
... {
Expand Down
6 changes: 1 addition & 5 deletions rdflib/plugins/serializers/jsonld.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@
Example usage::
>>> from rdflib.plugin import register, Serializer
>>> register('json-ld', Serializer, 'rdflib_jsonld.serializer', 'JsonLDSerializer')
>>> from rdflib import Graph
>>> testrdf = '''
... @prefix dc: <http://purl.org/dc/terms/> .
... <http://example.org/about>
Expand All @@ -19,7 +15,7 @@
>>> g = Graph().parse(data=testrdf, format='n3')
>>> print(g.serialize(format='json-ld', indent=4).decode())
>>> print(g.serialize(format='json-ld', indent=4))
[
{
"@id": "http://example.org/about",
Expand Down
2 changes: 2 additions & 0 deletions test/test_finalnewline.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ def testFinalNewline():
lines = v.split("\n".encode("latin-1"))
if b"\n" not in v or (lines[-1] != b""):
failed.add(p.name)
# JSON-LD does not require a final newline (because JSON doesn't)
failed = failed.difference({'json-ld', 'application/ld+json'})
assert len(failed) == 0, "No final newline for formats: '%s'" % failed


Expand Down

0 comments on commit 2df55aa

Please sign in to comment.