diff --git a/tests/vegalite/v5/test_theme.py b/tests/vegalite/v5/test_theme.py index 978d74093..7d4155bfc 100644 --- a/tests/vegalite/v5/test_theme.py +++ b/tests/vegalite/v5/test_theme.py @@ -46,6 +46,20 @@ def custom_theme() -> ThemeConfig: assert registered() == {"height": 400, "width": 700} == custom_theme() +def test_theme_unregister() -> None: + @theme.register("big square", enable=True) + def custom_theme() -> ThemeConfig: + return {"height": 1000, "width": 1000} + + assert theme.active == "big square" + fn = theme.unregister("big square") + assert fn is not None + assert fn() == custom_theme() + assert theme.active == theme.themes.active + # BUG: https://github.com/vega/altair/issues/3619 + # assert theme.active != "big square" + + @pytest.mark.parametrize( ("color_code", "valid"), [