# schema_salad.tests.test_makedoc

Test `schema-salad-doc`.

(also known as `schema-salad-tool --print-doc`)

For convenience, tests are checking exact strings. In the event of changes in the “mistune” package, makedoc.py, or other changes, feel free to modify the test strings as long as the new HTML renders the same way in typical browsers.

Likewise, if the schema-salad metaschema changes and it is missing one or more of the features tested below, then please copy those old features to a new file and update the affected tests to use those new file(s).

## Functions

`test_schema_salad_inherit_docs`() | Test schema-salad-doc when types inherit and override values from parent types.
`generate_doc`([schema_data]) | Avoid error when calling fixture directly.
`fixture_metaschema_doc`() | Pytest Fixture of the rendered HTML for the metaschema schema.
`test_doc_fenced_code_contents_preserved`() | Fenced code contents are not interpreted as Markdown definitions and converted into erroneous HTML.
`test_doc_headings_target_anchor`(metaschema_doc) | Doc headers must have an id and section link.
`test_doc_render_table_of_contents`(metaschema_doc) | The special Table of Contents token must be replaced with a rendered table.
`test_plain_links_autolinked`(metaschema_doc) | Plan links should be treated as if they were wrapped in angle brackets.
`test_embedded_html_unescaped`() | Raw HTML shouldn't get escaped.
`test_multiline_list_entries_word_spacing`(metaschema_doc) | Hanging indents in Markdown lists don't lead to wordsmushing.
`test_multiline_list_entries_without_indention`(...) | Hanging indents are not required in Markdown lists.
`test_detect_changes_in_html`(metaschema_doc, tmp_path) | Catch all for changes in HTML output, please adjust if the changes are innocent.

## Module Contents

schema_salad.tests.test_makedoc.test_schema_salad_inherit_docs()

  Test schema-salad-doc when types inherit and override values from parent types.

  Return type:

    None

schema_salad.tests.test_makedoc.generate_doc(schema_data=None)

  Avoid error when calling fixture directly.

  Parameters:

    schema_data (str | None)

  Return type:

    str

schema_salad.tests.test_makedoc.fixture_metaschema_doc()

  Pytest Fixture of the rendered HTML for the metaschema schema.

  Return type:

    str

schema_salad.tests.test_makedoc.test_doc_fenced_code_contents_preserved()

  Fenced code contents are not interpreted as Markdown definitions and converted into erroneous HTML.

  An example of problem case is when a definition looks like a Markdown list (e.g.: a YAML array). It must not be converted into HTML contents with list tags. However, special characters (e.g.: `<`, `>`) must still be escaped, otherwise they will not be correctly rendered within an HTML `<pre><code>` block.

  Return type:

    None

schema_salad.tests.test_makedoc.test_doc_headings_target_anchor(metaschema_doc)

  Doc headers must have an id and section link.

  Parameters:

    metaschema_doc (str)

  Return type:

    None

schema_salad.tests.test_makedoc.test_doc_render_table_of_contents(metaschema_doc)

  The special Table of Contents token must be replaced with a rendered table.

  Parameters:

    metaschema_doc (str)

  Return type:

    None

schema_salad.tests.test_makedoc.test_plain_links_autolinked(metaschema_doc)

  Plan links should be treated as if they were wrapped in angle brackets.

  Parameters:

    metaschema_doc (str)

  Return type:

    None

schema_salad.tests.test_makedoc.test_embedded_html_unescaped()

  Raw HTML shouldn’t get escaped.

  Return type:

    None

schema_salad.tests.test_makedoc.test_multiline_list_entries_word_spacing(metaschema_doc)

  Hanging indents in Markdown lists don’t lead to wordsmushing.

  Parameters:

    metaschema_doc (str)

  Return type:

    None

schema_salad.tests.test_makedoc.test_multiline_list_entries_without_indention(metaschema_doc)

  Hanging indents are not required in Markdown lists.

  Parameters:

    metaschema_doc (str)

  Return type:

    None

schema_salad.tests.test_makedoc.test_detect_changes_in_html(metaschema_doc, tmp_path)

  Catch all for changes in HTML output, please adjust if the changes are innocent.

  Parameters:

    - metaschema_doc (str)

    - tmp_path (pathlib.Path)

  Return type:

    None