Added trig unit tests to highlight some current parsing/serializing issues by davechallis · Pull Request #431 · RDFLib/rdflib (original) (raw)
This adds some TriG unit tests that currently fail (but should pass when issues are resolved).
testGraphParsing
currently fails due to the TriG parser treating triples in the default graph with and without enclosing braces as 2 separate contexts, whereas they should both be treated as one.
testRoundTrips
tests whether repeatedly parsing/serializing the same data results in a graph containing the same items. Currently this fails due to a combination of the issue mentioned above, and due to an issue with handling QNames in the TriG serializer.
testDefaultGraphSerializesWithoutName
checks that triples in the default graph are serialized correctly. Currently this fails, as the default graph is serialized as <None> { ... }
.
I'm planning to look into fixes for these, but thought adding some failing unit tests first would be more useful, in case anyone else wants to look at or fix them too.