summaryrefslogtreecommitdiffstats
path: root/rtemsspec/tests/test_items_item.py
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2020-10-21 18:22:22 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-10-21 18:22:22 +0200
commita8ba97d18dc79113dd8e0cc0a649274bf935a88d (patch)
tree795146c0eb7b425a1526f624520285924de93765 /rtemsspec/tests/test_items_item.py
parentmodules: Update rtems (diff)
downloadrtems-central-a8ba97d18dc79113dd8e0cc0a649274bf935a88d.tar.bz2
items: Add Item parent() and child() methods
Diffstat (limited to 'rtemsspec/tests/test_items_item.py')
-rw-r--r--rtemsspec/tests/test_items_item.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/rtemsspec/tests/test_items_item.py b/rtemsspec/tests/test_items_item.py
index fcc22582..bb9b085d 100644
--- a/rtemsspec/tests/test_items_item.py
+++ b/rtemsspec/tests/test_items_item.py
@@ -149,6 +149,9 @@ def test_children():
assert links[0].item == child
assert links[0]["a"] == "b"
assert links[0].role == "c"
+ assert parent.child("c") == child
+ with pytest.raises(IndexError):
+ parent.child("c", 1)
def test_parents():
@@ -182,6 +185,9 @@ def test_parents():
assert links[0].item == parent
assert links[0]["a"] == "b"
assert links[0].role == "c"
+ assert child.parent("c") == parent
+ with pytest.raises(IndexError):
+ child.parent("c", 1)
def _is_enabled(enabled, enabled_by):