diff --git a/asdf/tests/test_deprecated.py b/asdf/tests/test_deprecated.py index 49746b5f0..767148bad 100644 --- a/asdf/tests/test_deprecated.py +++ b/asdf/tests/test_deprecated.py @@ -84,3 +84,14 @@ def test_default_resolver(): def test_get_cached_asdf_extension_list_deprecation(): with pytest.warns(AsdfDeprecationWarning, match="get_cached_asdf_extension_list is deprecated"): asdf.extension.get_cached_asdf_extension_list([]) + + +@pytest.mark.parametrize("name", ["AsdfExtension", "AsdfExtensionList", "BuiltinExtension"]) +def test_extension_class_deprecation(name): + with pytest.warns(AsdfDeprecationWarning, match=f"{name} is deprecated"): + getattr(asdf.extension, name) + + +def test_top_level_asdf_extension_deprecation(): + with pytest.warns(AsdfDeprecationWarning, match="AsdfExtension is deprecated"): + asdf.AsdfExtension