diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-05-27 14:14:47 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-05-28 10:38:23 +0200 |
commit | f156ed10afd9125e0dfe1a0b9edb69bf828f4887 (patch) | |
tree | 3ddecfd5e7c8097ec09db303c5e93f99e9e6c079 /rtemsqual/tests/test_content_sphinx.py | |
parent | sphinxcontent: Move Sphinx content to new module (diff) | |
download | rtems-central-f156ed10afd9125e0dfe1a0b9edb69bf828f4887.tar.bz2 |
sphinxcontent: Make label/reference functions
Diffstat (limited to 'rtemsqual/tests/test_content_sphinx.py')
-rw-r--r-- | rtemsqual/tests/test_content_sphinx.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/rtemsqual/tests/test_content_sphinx.py b/rtemsqual/tests/test_content_sphinx.py index 43272c38..c4b6dfe3 100644 --- a/rtemsqual/tests/test_content_sphinx.py +++ b/rtemsqual/tests/test_content_sphinx.py @@ -26,7 +26,8 @@ import pytest -from rtemsqual.sphinxcontent import SphinxContent, SphinxMapper +from rtemsqual.sphinxcontent import get_reference, get_section_label, \ + SphinxContent, SphinxMapper from rtemsqual.items import Item, ItemCache, ItemMapper from rtemsqual.tests.util import create_item_cache_config_and_copy_spec @@ -99,9 +100,12 @@ yz w def test_get_reference(): - content = SphinxContent() - assert content.get_reference("a") == ":ref:`a`" - assert content.get_reference("a", "b") == ":ref:`b <a>`" + assert get_reference("a") == ":ref:`a`" + assert get_reference("a", "b") == ":ref:`b <a>`" + + +def test_get_section_label(): + assert get_section_label("ab cd") == "SectionAbCd" def test_section(): |