schema_salad.tests.test_runtime

Test the runtime module.

Attributes

BASE

Functions

test_save_relative_uri_sibling_prefix()

A sibling id sharing a name prefix with the scope must not be truncated.

test_save_relative_uri_sibling_prefix_ref_scope_1()

Same as above for ref_scope=1 fields, e.g. a CWL Workflow outputSource.

test_save_relative_uri_sibling()

An ordinary sibling reference is saved as its full fragment.

test_save_relative_uri_inside_scope()

A reference is relativized against the scope the loader resolves it in.

test_save_relative_uri_packed()

In a packed document, only the enclosing process's name is stripped.

test_save_relative_uri_scope_is_document_root()

When ref_scope pops every fragment segment, the full fragment is kept.

test_save_relative_uri_no_ref_scope()

Without ref_scope the base fragment already ends in a slash.

test_save_relative_uri_round_trip(uri, base, ref_scope)

Loading a saved scoped reference gives back the original URI.

Module Contents

schema_salad.tests.test_runtime.BASE = 'file:///wf.cwl#second_step/input_2'
schema_salad.tests.test_runtime.test_save_relative_uri_sibling_prefix()

A sibling id sharing a name prefix with the scope must not be truncated.

E.g. in CWL, a step input sourced from a workflow input whose name starts with the step’s own name:

inputs:

second_step_input: string # id: …#second_step_input

steps:
second_step:
in:

input_2: second_step_input # id: …#second_step/input_2

Saving the source field (ref_scope=2) must yield “second_step_input”, not “_input”.

Return type:

None

schema_salad.tests.test_runtime.test_save_relative_uri_sibling_prefix_ref_scope_1()

Same as above for ref_scope=1 fields, e.g. a CWL Workflow outputSource.

outputs:
second: # id: …#second

outputSource: second_step/log

must save as “second_step/log”, not “_step/log”.

Return type:

None

schema_salad.tests.test_runtime.test_save_relative_uri_sibling()

An ordinary sibling reference is saved as its full fragment.

E.g. CWL’s source: first_input or source: first_step/log.

Return type:

None

schema_salad.tests.test_runtime.test_save_relative_uri_inside_scope()

A reference is relativized against the scope the loader resolves it in.

For a ref_scope=2 field on “#second_step/input_2” that scope is the document root, so a step output keeps its step name.

Return type:

None

schema_salad.tests.test_runtime.test_save_relative_uri_packed()

In a packed document, only the enclosing process’s name is stripped.

E.g. source: inp on step input “#main/step/in” (ref_scope=2) and outputSource: step/log on workflow output “#main/out” (ref_scope=1).

Return type:

None

schema_salad.tests.test_runtime.test_save_relative_uri_scope_is_document_root()

When ref_scope pops every fragment segment, the full fragment is kept.

E.g. a ref_scope=2 field whose own id is a single top-level fragment.

Return type:

None

schema_salad.tests.test_runtime.test_save_relative_uri_no_ref_scope()

Without ref_scope the base fragment already ends in a slash.

E.g. how CWL’s scatter: input_2 is saved relative to its step.

Return type:

None

schema_salad.tests.test_runtime.test_save_relative_uri_round_trip(uri, base, ref_scope)

Loading a saved scoped reference gives back the original URI.

Parameters:
Return type:

None