timetoshare.fixtures#
The bundled cases of the current version: fixtures, rejections and warnings.
The emitted manifests under fixtures/<version>/ (drawings excluded), the
canonical N-Quads expected of the statement fixtures under
fixtures/rdf/<version>/, the hand-authored rejection cases under
fixtures/rejections/<version>/ and the hand-authored warning cases under
fixtures/warnings/<version>/, found beside the schema. The cases are
written in canonical YAML (.yaml); a rejection or warning case about JSON
text itself would be written in JSON (.json); none is at present. Every
case is read with loads(), as the JavaScript
package reads it.
- timetoshare.fixtures.fixture_paths()[source]#
Return every bundled manifest fixture, excluding drawings.
- timetoshare.fixtures.rdf_expectation(path)[source]#
Return the canonical N-Quads file expected of a statement fixture.
fixtures/rdf/<version>/<name>.nqfor the fixturestatements/<name>.yamland for its minimal twinstatements/<name>.minimal.yamlalike: both read to the same graph. The file may not exist yet; the caller reads it.
- class timetoshare.fixtures.RejectionCase(manifest, path, code, error, reason)[source]#
Bases:
objectOne shared rejection case, read for validation.
- manifest#
The value to validate, with any non-finite number in place.
- Type:
Any
- timetoshare.fixtures.rejection_case(path)[source]#
Read one shared rejection case from
path.A case holds no NaN and no infinity, which no serialization writes, so a case about the finite rule stores a finite placeholder at its path and names the value to put there under
non_finite; the reader puts it in place.- Raises:
ValueError – If the file cannot be read or names an unknown non-finite value.