-
Notifications
You must be signed in to change notification settings - Fork 560
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add (skipping) test for unresolved issue #161
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
from unittest import TestCase | ||
from rdflib.graph import ConjunctiveGraph | ||
from nose.exc import SkipTest | ||
|
||
class EntityTest(TestCase): | ||
|
||
def test_turtle_namespace_prefixes(self): | ||
raise SkipTest('Skipping: Turtle serializer preserves n3 prefixes (eg. "_9") that violate Turtle syntax.') | ||
g = ConjunctiveGraph() | ||
n3 = \ | ||
""" | ||
@prefix _9: <http://data.linkedmdb.org/resource/movie/> . | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | ||
<http://data.linkedmdb.org/resource/director/1> a | ||
<http://data.linkedmdb.org/resource/movie/director>; | ||
rdfs:label "Cecil B. DeMille (Director)"; | ||
_9:director_name "Cecil B. DeMille" .""" | ||
g.parse(data=n3, format='n3') | ||
turtle = g.serialize(format="turtle") | ||
# Check round-tripping, just for kicks. | ||
g = ConjunctiveGraph() | ||
g.parse(data=turtle, format='turtle') | ||
# Shouldn't have got to here | ||
self.assert_('_9' not in g.serialize(format="turtle")) | ||
|
||
|
||
|
||
|