summaryrefslogtreecommitdiffstats
path: root/rtemsqual/tests/test_content_sphinx.py
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-06-26 20:01:46 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-07-03 10:22:46 +0200
commit0dada0449d51ef50c7d19d4130866d7a7360abcf (patch)
treeee36739478723d562ac7fa9905b1a69e7acb3708 /rtemsqual/tests/test_content_sphinx.py
parentitems: Add support for aggregated item type (diff)
downloadrtems-central-0dada0449d51ef50c7d19d4130866d7a7360abcf.tar.bz2
items: Add ItemGetValueContext
Use aggregated item type in get_value() methods.
Diffstat (limited to 'rtemsqual/tests/test_content_sphinx.py')
-rw-r--r--rtemsqual/tests/test_content_sphinx.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/rtemsqual/tests/test_content_sphinx.py b/rtemsqual/tests/test_content_sphinx.py
index 5d24a818..f6c7f057 100644
--- a/rtemsqual/tests/test_content_sphinx.py
+++ b/rtemsqual/tests/test_content_sphinx.py
@@ -261,12 +261,14 @@ def test_license_and_copyrights():
def test_substitute(tmpdir):
- config = create_item_cache_config_and_copy_spec(tmpdir, "spec-sphinx")
+ config = create_item_cache_config_and_copy_spec(tmpdir,
+ "spec-sphinx",
+ with_spec_types=True)
item_cache = ItemCache(config)
mapper = SphinxMapper(item_cache["/x"])
with pytest.raises(KeyError):
mapper.substitute("${x:/y}")
assert mapper.substitute("${x:/term}") == ":term:`y`"
assert mapper.substitute("${x:/plural}") == ":term:`ys <y>`"
- mapper.add_get_reference("foo", "/name", lambda x, y: x[y])
- assert mapper.substitute("${y:/name}") == "bar"
+ mapper.add_get_reference("other:/name", lambda x, y: x[y])
+ assert mapper.substitute("${y:/name}") == "foobar"