From e0033315510510acdba14e880a361ccca091fb4b Mon Sep 17 00:00:00 2001 From: Matthew Martin Date: Wed, 5 Jan 2022 21:16:43 -0600 Subject: fix ParamType.to_info_dict() with no name --- tests/test_info_dict.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests') diff --git a/tests/test_info_dict.py b/tests/test_info_dict.py index b58ad6e..79d39ee 100644 --- a/tests/test_info_dict.py +++ b/tests/test_info_dict.py @@ -266,3 +266,10 @@ def test_context(): "ignore_unknown_options": False, "auto_envvar_prefix": None, } + + +def test_paramtype_no_name(): + class TestType(click.ParamType): + pass + + assert TestType().to_info_dict()["name"] == "TestType" -- cgit v1.2.1