summaryrefslogtreecommitdiffstats
path: root/rtemsqual/tests/test_content_sphinx.py
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-05-27 14:42:09 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-05-28 10:38:23 +0200
commite720d8418a2154a0786b62d77e2859624aff5a9e (patch)
tree4fddeb73dcdee633b0ad142176b2b4979b1bbbc4 /rtemsqual/tests/test_content_sphinx.py
parentsphinxcontent: Make label/reference functions (diff)
downloadrtems-central-e720d8418a2154a0786b62d77e2859624aff5a9e.tar.bz2
sphinxcontent: Add SphinxMapper.add_get_reference()
Diffstat (limited to 'rtemsqual/tests/test_content_sphinx.py')
-rw-r--r--rtemsqual/tests/test_content_sphinx.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/rtemsqual/tests/test_content_sphinx.py b/rtemsqual/tests/test_content_sphinx.py
index c4b6dfe3..83f4cbd9 100644
--- a/rtemsqual/tests/test_content_sphinx.py
+++ b/rtemsqual/tests/test_content_sphinx.py
@@ -251,4 +251,6 @@ def test_substitute(tmpdir):
mapper = SphinxMapper(item_cache["/x"])
with pytest.raises(KeyError):
mapper.substitute("${x:/y}")
- assert ":term:`y`" == mapper.substitute("${x:/term}")
+ assert mapper.substitute("${x:/term}") == ":term:`y`"
+ mapper.add_get_reference("foo", "/name", lambda x, y: x[y])
+ assert mapper.substitute("${y:/name}") == "bar"