We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5fa385c commit ed9966fCopy full SHA for ed9966f
tests/test_item.py
@@ -617,9 +617,15 @@ def test_non_hierarchical_relative_link() -> None:
617
root.add_child(a)
618
root.add_child(b)
619
a.add_link(pystac.Link("related", b))
620
+ b.add_link(
621
+ pystac.Link("item", TestCases.get_path("data-files/item/sample-item.json"))
622
+ )
623
624
root.catalog_type = pystac.catalog.CatalogType.SELF_CONTAINED
625
root.normalize_hrefs("test_output")
626
related_href = [link for link in a.links if link.rel == "related"][0].get_href()
627
628
assert related_href is not None and not is_absolute_href(related_href)
629
+ assert a.target_in_hierarchy(b)
630
+ assert root.target_in_hierarchy(next(b.get_items()))
631
+ assert root.target_in_hierarchy(root)
0 commit comments