From fa2c0a29dd2b98b6570d7053d6ec10b842fdfee6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pere=20D=C3=ADaz?= Date: Wed, 3 Feb 2021 12:52:25 +0100 Subject: [PATCH] more test cases which fail, wip fix --- ...est_structured_config_container_element.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/structured_conf/test_structured_config_container_element.py b/tests/structured_conf/test_structured_config_container_element.py index 62cd044b2..0b1fbfa67 100644 --- a/tests/structured_conf/test_structured_config_container_element.py +++ b/tests/structured_conf/test_structured_config_container_element.py @@ -48,9 +48,28 @@ def test_container_as_element_type_valid( [ ("ContainerInList", [{"user": True}], "list_with_dict"), ("ContainerInList", [{"user": User()}], "list_with_dict"), + ( + "ContainerInList", + ListConfig( + content=[{"user": User()}], + ref_type=List[Dict[str, User]], + element_type=Dict[str, User], + ), + "list_with_dict", + ), ("ContainerInList", [[1, 2], [True, 4]], "list_with_list"), ("ContainerInList", [[1, 2], [User(), 4]], "list_with_list"), ("ContainerInDict", {"users": {"default": True}}, "dict_with_dict"), + ( + "ContainerInDict", + DictConfig( + content={"users": {"default": True}}, + ref_type=Dict[str, Dict[str, bool]], + element_type=Dict[str, bool], + key_type=str, + ), + "dict_with_dict", + ), ("ContainerInDict", {"users": {"default": User()}}, "dict_with_dict"), ("ContainerInDict", {"users": [1, True]}, "dict_with_list"), ("ContainerInDict", {"users": [1, User()]}, "dict_with_list"),