schema_salad.tests.test_makedoc
===============================

.. py:module:: schema_salad.tests.test_makedoc

.. autoapi-nested-parse::

   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
---------

.. autoapisummary::

   schema_salad.tests.test_makedoc.test_schema_salad_inherit_docs
   schema_salad.tests.test_makedoc.generate_doc
   schema_salad.tests.test_makedoc.fixture_metaschema_doc
   schema_salad.tests.test_makedoc.test_doc_fenced_code_contents_preserved
   schema_salad.tests.test_makedoc.test_doc_headings_target_anchor
   schema_salad.tests.test_makedoc.test_doc_render_table_of_contents
   schema_salad.tests.test_makedoc.test_plain_links_autolinked
   schema_salad.tests.test_makedoc.test_embedded_html_unescaped
   schema_salad.tests.test_makedoc.test_multiline_list_entries_word_spacing
   schema_salad.tests.test_makedoc.test_multiline_list_entries_without_indention
   schema_salad.tests.test_makedoc.test_detect_changes_in_html


Module Contents
---------------

.. py:function:: test_schema_salad_inherit_docs()

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


.. py:function:: generate_doc(schema_data = None)

   Avoid error when calling fixture directly.


.. py:function:: fixture_metaschema_doc()

   Pytest Fixture of the rendered HTML for the metaschema schema.


.. py:function:: 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.


.. py:function:: test_doc_headings_target_anchor(metaschema_doc)

   Doc headers must have an id and section link.


.. py:function:: test_doc_render_table_of_contents(metaschema_doc)

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


.. py:function:: test_plain_links_autolinked(metaschema_doc)

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


.. py:function:: test_embedded_html_unescaped()

   Raw HTML shouldn't get escaped.


.. py:function:: test_multiline_list_entries_word_spacing(metaschema_doc)

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


.. py:function:: test_multiline_list_entries_without_indention(metaschema_doc)

   Hanging indents are not required in Markdown lists.


.. py:function:: test_detect_changes_in_html(metaschema_doc, tmp_path)

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


