hydra-kernel-0.18.1: hydra-kernel-json/hydra/core/testing.json
{
"name": "hydra.core.testing",
"metadata": {"description": "A model for unit testing", "comments": [], "seeAlso": [], "provisions": []},
"dependencies": [{"module": "hydra.core.model"}],
"definitions": [
{
"type": {
"name": "hydra.core.testing.EffectfulTestCase",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {
"record": [
{
"name": "actual",
"type": {
"annotated": {
"body": {"function": {"domain": "unit", "codomain": {"effect": {"literal": "string"}}}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {
"literal": {
"string": "A thunk producing the effect to be interpreted by the test runner. The thunk defers construction of the effect until the runner forces it."}}}]}}}},
{
"name": "expected",
"type": {
"annotated": {
"body": {"function": {"domain": "unit", "codomain": {"literal": "string"}}},
"annotation": {
"map": [
{"key": {"variable": "description"}, "value": {"literal": {"string": "A thunk producing the expected result string."}}}]}}}}]},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {
"literal": {
"string": "An effectful test case: the actual value is a thunk producing an effect, which the test runner interprets (performing host interactions, e.g. file I/O within a per-case empty temporary directory) to obtain a result string; the expected value is a thunk producing a string."}}}]}}},
"constraints": []}}},
{
"type": {
"name": "hydra.core.testing.Tag",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {"wrap": {"literal": "string"}},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "A tag for test cases"}}}]}}},
"constraints": []}}},
{
"type": {
"name": "hydra.core.testing.TestCase",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {
"union": [
{
"name": "effectful",
"type": {
"annotated": {
"body": {"variable": "hydra.core.testing.EffectfulTestCase"},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "An effectful test case (interpret an effect, then string comparison)"}}}]}}}},
{
"name": "universal",
"type": {
"annotated": {
"body": {"variable": "hydra.core.testing.UniversalTestCase"},
"annotation": {
"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "A universal test case (string comparison)"}}}]}}}}]},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "A test case with an actual and expected string for comparison"}}}]}}},
"constraints": []}}},
{
"type": {
"name": "hydra.core.testing.TestCaseWithMetadata",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {
"record": [
{
"name": "name",
"type": {
"annotated": {
"body": {"literal": "string"},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "A short name for the test case"}}}]}}}},
{
"name": "case",
"type": {
"annotated": {
"body": {"variable": "hydra.core.testing.TestCase"},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "The test case itself"}}}]}}}},
{
"name": "description",
"type": {
"annotated": {
"body": {"optional": {"literal": "string"}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "An optional longer description of the test case"}}}]}}}},
{
"name": "tags",
"type": {
"annotated": {
"body": {"list": {"variable": "hydra.core.testing.Tag"}},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "Zero or more tags for the test case"}}}]}}}},
{
"name": "provisions",
"type": {
"annotated": {
"body": {"list": {"variable": "hydra.core.model.Name"}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {
"literal": {
"string": "The fully-qualified names of zero or more provisions (hydra.core.packaging.Provision) which this test case confirms. A provision is authoritative with zero, one, or many confirming tests."}}}]}}}}]},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "A test case together with metadata"}}}]}}},
"constraints": []}}},
{
"type": {
"name": "hydra.core.testing.TestGroup",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {
"record": [
{
"name": "name",
"type": {
"annotated": {
"body": {"literal": "string"},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "A short name for the test group"}}}]}}}},
{
"name": "description",
"type": {
"annotated": {
"body": {"optional": {"literal": "string"}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "An optional longer description of the test group"}}}]}}}},
{
"name": "subgroups",
"type": {
"annotated": {
"body": {"list": {"variable": "hydra.core.testing.TestGroup"}},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "Zero or more subgroups"}}}]}}}},
{
"name": "cases",
"type": {
"annotated": {
"body": {"list": {"variable": "hydra.core.testing.TestCaseWithMetadata"}},
"annotation": {"map": [{"key": {"variable": "description"}, "value": {"literal": {"string": "Zero or more test cases"}}}]}}}}]},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "A collection of test cases with a name and optional description"}}}]}}},
"constraints": []}}},
{
"type": {
"name": "hydra.core.testing.UniversalTestCase",
"body": {
"variables": [],
"body": {
"annotated": {
"body": {
"record": [
{
"name": "actual",
"type": {
"annotated": {
"body": {"function": {"domain": "unit", "codomain": {"literal": "string"}}},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {
"literal": {
"string": "A thunk producing the actual result string. Wrapping in a thunk defers expression evaluation until the test runner forces it, so eagerly-evaluated hosts measure expression cost inside their timing bracket rather than at test-data load time."}}}]}}}},
{
"name": "expected",
"type": {
"annotated": {
"body": {"function": {"domain": "unit", "codomain": {"literal": "string"}}},
"annotation": {
"map": [
{"key": {"variable": "description"}, "value": {"literal": {"string": "A thunk producing the expected result string."}}}]}}}}]},
"annotation": {
"map": [
{
"key": {"variable": "description"},
"value": {"literal": {"string": "A universal test case: the actual and expected values are thunks producing strings."}}}]}}},
"constraints": []}}}]}