diff --git a/numcodecs/tests/package_without_entrypoint-0.1.dist-info/entry_points.txt b/numcodecs/tests/package_without_entrypoint-0.1.dist-info/entry_points.txt new file mode 100644 index 00000000..5a0f5024 --- /dev/null +++ b/numcodecs/tests/package_without_entrypoint-0.1.dist-info/entry_points.txt @@ -0,0 +1 @@ +[numcodecs.codecs] diff --git a/numcodecs/tests/package_without_entrypoint/__init__.py b/numcodecs/tests/package_without_entrypoint/__init__.py new file mode 100644 index 00000000..e3022c48 --- /dev/null +++ b/numcodecs/tests/package_without_entrypoint/__init__.py @@ -0,0 +1 @@ +from numcodecs.abc import Codec diff --git a/numcodecs/tests/test_entrypoints.py b/numcodecs/tests/test_entrypoints.py index 43503ec3..f18cb8b7 100644 --- a/numcodecs/tests/test_entrypoints.py +++ b/numcodecs/tests/test_entrypoints.py @@ -18,6 +18,11 @@ def set_path(): numcodecs.registry.codec_registry.pop("test") +def test_no_entrypoint_codec(): + cls = numcodecs.registry.get_codec({"id": "test"}) + assert cls.codec_id == "test" + + @pytest.mark.usefixtures("set_path") def test_entrypoint_codec(): cls = numcodecs.registry.get_codec({"id": "test"})