Skip to content

Commit 1fbf4c2

Browse files
committed
More specific error message in test_writing
1 parent e15c7c0 commit 1fbf4c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_writing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def validate_catalog_link_type(
7474
cat_dict = pystac.StacIO.default().read_json(href)
7575
cat = pystac.read_file(href)
7676
if not isinstance(cat, pystac.Catalog):
77-
raise pystac.STACTypeError(f"File at {href} is not a Catalog.")
77+
raise pystac.STACTypeError(f"File at {href} is a {cat.STAC_OBJECT_TYPE} not a Catalog.")
7878

7979
rels = set([link["rel"] for link in cat_dict["links"]])
8080
self.assertEqual("self" in rels, should_include_self)

0 commit comments

Comments
 (0)