Skip to content

Commit

Permalink
add deprecation tests, update changes
Browse files Browse the repository at this point in the history
  • Loading branch information
braingram committed Feb 22, 2023
1 parent 8cfa2b1 commit 0e38f0a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions asdf/tests/test_deprecated.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 0e38f0a

Please sign in to comment.