Skip to main content

Module spectest

Module spectest 

Source
Expand description

SpecTest: parse and validate workload specification examples.

The workload_definition markdown files contain test triples:

  1. *yaml:* — YAML source
  2. *json:* — JSON equivalent (validated against YAML parse)
  3. *ops:* — ParsedOp API view (validated against normalization)

This module parses those triples from markdown and validates them.

Structs§

SpecTestCase
A single spectest triple extracted from a markdown file.

Functions§

extract_spec_tests
Extract all spectest triples from a markdown file.
run_spec_tests
Run all spectest cases from a markdown file. Returns (passed, failed, errors).
validate_spec_test
Validate a single spectest case.