Skip to content

Blank nodes in the test suite #661

Closed
@pjohnston-wiley

Description

@pjohnston-wiley

A number of tests appear to be excessively prescriptive about the use of blank nodes, which will make some implementations fail.

For example, frame-0010-out.jsonld. This specifies a result with:

"dc:creator": {
      "@id": "_:b0",
      "foaf:name": "John Doe"
    }

This implicitly mandates that compliant json-ld processors use a specific algorithm _:b# to generate blank nodes. This isn't the only way to generate blank nodes: hashing the node could be a viable alternative, as could a UUID, for example.

The reason i came on this one is that the current incarnation of pyld is failing this test, because it defaults pruneBlankNodeIdentifiers to true, which is correct, so the test is actually wrong. I also realize this is being removed entirely for 1.1, so the test needs to get amended because of that.

However, the problem will still be there for blank nodes that are referenced more than once (i am not sure if a test for this already exists). There may need to be an instruction to test suite implementers that singleton blank node identifiers should not be tested.

It also raises the issue that the suite is not testing processor options other than the default, which seems to be a gap, unless these are all going away in 1.1? One possibility I suggested in issue 641 is allowing processor options to be embedded in the frame json itself. Alternatively, this could be an optional file in the test suite.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions