diff --git a/doc/unit_test.rst b/doc/unit_test.rst index de2c4d5f..10124de4 100644 --- a/doc/unit_test.rst +++ b/doc/unit_test.rst @@ -10,6 +10,8 @@ Unit Tests Unit Tests for mlx.traceability ------------------------------- +.. test item-link defined before item-relink and item definitions: item-link shall always be processed first + .. item-relink:: :remap: RQT-ATTRIBUTES_FAKE :target: RQT-ATTRIBUTES @@ -57,4 +59,15 @@ Unit Tests for mlx.traceability :validates: RQT-MATRIX .. item:: UTEST_ITEM_DIRECTIVE-MAKE_INTERNAL_ITEM_REF_SHOW_CAPTION - :validates: RQT-CAPTION + +.. test item-relink defined after item-link and item definitions: item-link shall always be processed first + +.. item-link:: + :sources: nonexistent_item + :targets: RQT-CAPTION + :type: validates + +.. item-relink:: + :remap: nonexistent_item + :target: UTEST_ITEM_DIRECTIVE-MAKE_INTERNAL_ITEM_REF_SHOW_CAPTION + :type: validated_by diff --git a/mlx/traceable_item.py b/mlx/traceable_item.py index 04033724..88950b71 100644 --- a/mlx/traceable_item.py +++ b/mlx/traceable_item.py @@ -60,7 +60,8 @@ def all_relations(self): targets.update(self.explicit_relations[relation]) if relation in self.implicit_relations: targets.update(self.implicit_relations[relation]) - yield relation, natsorted(targets) + if targets: + yield relation, natsorted(targets) @staticmethod def _add_relations(relations_of_self, relations_of_other): diff --git a/tools/doc-warnings.json b/tools/doc-warnings.json index dcb3ad6a..72122e76 100644 --- a/tools/doc-warnings.json +++ b/tools/doc-warnings.json @@ -1,8 +1,8 @@ { "sphinx": { "enabled": true, - "min": 23, - "max": 23, + "min": 24, + "max": 24, "exclude": [ "WARNING: the mlx.traceability extension is not safe for parallel reading", "WARNING: doing serial read"