From e56c7baa395c18e76d763d5850a61612ca265e93 Mon Sep 17 00:00:00 2001 From: Benedikt Bartscher Date: Thu, 10 Oct 2024 18:01:20 +0200 Subject: [PATCH] add failing test for figure_out_type --- tests/units/vars/test_base.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/units/vars/test_base.py b/tests/units/vars/test_base.py index f83d79373..5f01dab43 100644 --- a/tests/units/vars/test_base.py +++ b/tests/units/vars/test_base.py @@ -5,6 +5,12 @@ import pytest from reflex.vars.base import figure_out_type +class CustomDict(dict[str, str]): + """A custom dict.""" + + pass + + @pytest.mark.parametrize( ("value", "expected"), [ @@ -15,6 +21,7 @@ from reflex.vars.base import figure_out_type ([1, 2.0, "a"], List[Union[int, float, str]]), ({"a": 1, "b": 2}, Dict[str, int]), ({"a": 1, 2: "b"}, Dict[Union[int, str], Union[str, int]]), + (CustomDict(), CustomDict), ], ) def test_figure_out_type(value, expected):