diff --git a/asdf/_tests/test_asdf.py b/asdf/_tests/test_asdf.py index 1501f3a21..e408b2d70 100644 --- a/asdf/_tests/test_asdf.py +++ b/asdf/_tests/test_asdf.py @@ -125,10 +125,7 @@ def test_asdf_file_extensions(): af.extensions = arg assert af.extensions == [ExtensionProxy(extension)] - msg = ( - r"[The extensions parameter must be an extension.*, " - r"Extension must implement the Extension or AsdfExtension interface]" - ) + msg = r"[The extensions parameter must be an extension.*, Extension must implement the Extension interface]" for arg in (object(), [object()]): with pytest.raises(TypeError, match=msg): AsdfFile(extensions=arg) @@ -185,10 +182,7 @@ def test_open_asdf_extensions(tmp_path): with open_asdf(path, extensions=arg) as af: assert af.extensions == [ExtensionProxy(extension)] - msg = ( - r"[The extensions parameter must be an extension.*, " - r"Extension must implement the Extension or AsdfExtension interface]" - ) + msg = r"[The extensions parameter must be an extension.*, Extension must implement the Extension interface]" for arg in (object(), [object()]): with pytest.raises(TypeError, match=msg), open_asdf(path, extensions=arg) as af: pass @@ -211,7 +205,7 @@ def test_serialization_context(): assert context.url == context._url == "file://test.asdf" - with pytest.raises(TypeError, match=r"Extension must implement the Extension or AsdfExtension interface"): + with pytest.raises(TypeError, match=r"Extension must implement the Extension interface"): context._mark_extension_used(object()) with pytest.raises(ValueError, match=r"ASDF Standard version .* is not supported by asdf==.*"): diff --git a/asdf/_tests/test_entry_points.py b/asdf/_tests/test_entry_points.py index baaed37ba..ec45ca05d 100644 --- a/asdf/_tests/test_entry_points.py +++ b/asdf/_tests/test_entry_points.py @@ -151,7 +151,7 @@ def test_get_extensions(mock_entry_points): ) with pytest.warns( AsdfWarning, - match=r"TypeError: Extension must implement the Extension or AsdfExtension interface", + match=r"TypeError: Extension must implement the Extension interface", ): extensions = entry_points.get_extensions() assert len(extensions) == 2 diff --git a/asdf/_tests/test_extension.py b/asdf/_tests/test_extension.py index affdd3dce..bb2a40b19 100644 --- a/asdf/_tests/test_extension.py +++ b/asdf/_tests/test_extension.py @@ -162,7 +162,7 @@ def test_extension_proxy_maybe_wrap(): assert proxy.delegate is extension assert ExtensionProxy.maybe_wrap(proxy) is proxy - with pytest.raises(TypeError, match=r"Extension must implement the Extension or AsdfExtension interface"): + with pytest.raises(TypeError, match=r"Extension must implement the Extension interface"): ExtensionProxy.maybe_wrap(object()) @@ -241,7 +241,7 @@ def test_extension_proxy(): assert proxy.class_name == "asdf._tests.test_extension.FullExtension" # Should fail when the input is not one of the two extension interfaces: - with pytest.raises(TypeError, match=r"Extension must implement the Extension or AsdfExtension interface"): + with pytest.raises(TypeError, match=r"Extension must implement the Extension interface"): ExtensionProxy(object) # Should fail with a bad converter: diff --git a/asdf/extension/_extension.py b/asdf/extension/_extension.py index 11a288ed0..d19ce81ac 100644 --- a/asdf/extension/_extension.py +++ b/asdf/extension/_extension.py @@ -147,7 +147,7 @@ def maybe_wrap(cls, delegate): def __init__(self, delegate, package_name=None, package_version=None): if not isinstance(delegate, (Extension, _AsdfExtension)): - msg = "Extension must implement the Extension or AsdfExtension interface" + msg = "Extension must implement the Extension interface" raise TypeError(msg) self._delegate = delegate diff --git a/asdf/extension/_manager.py b/asdf/extension/_manager.py index 3509a201d..155f84914 100644 --- a/asdf/extension/_manager.py +++ b/asdf/extension/_manager.py @@ -203,7 +203,7 @@ def get_cached_extension_manager(extensions): Parameters ---------- - extensions : list of asdf.extension.AsdfExtension or asdf.extension.Extension + extensions : list of asdf.extension.Extension Returns -------