Skip to content

Commit b492bce

Browse files
committed
refactor: Simplify assertion
1 parent 9729a5b commit b492bce

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

tests/test_writing.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,7 @@ def validate_catalog_link_type(
5959
) -> None:
6060
cat_dict = pystac.StacIO.default().read_json(href)
6161
cat = pystac.read_file(href)
62-
if not isinstance(cat, pystac.Catalog):
63-
raise pystac.STACTypeError(
64-
f"File at {href} is a {cat.STAC_OBJECT_TYPE} not a Catalog."
65-
)
62+
assert isinstance(cat, pystac.Catalog)
6663

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

0 commit comments

Comments
 (0)