From 59c2be2ebc94fe582bdb16f2bdc13084bcf8ea79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8xbro=20Hansen?= Date: Mon, 3 Jun 2024 11:05:12 +0200 Subject: [PATCH] Try to improve theme tests (#6848) * Try to make DesignTest a fixture * Try by copying modifiers * Try to clear state.stylesheets --- panel/tests/theme/test_base.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/panel/tests/theme/test_base.py b/panel/tests/theme/test_base.py index 2a91ba7fe2..6af67f2826 100644 --- a/panel/tests/theme/test_base.py +++ b/panel/tests/theme/test_base.py @@ -1,13 +1,21 @@ import pathlib +import pytest + from bokeh.models import ImportedStyleSheet from panel.io.resources import CDN_DIST +from panel.io.state import state from panel.theme.base import BOKEH_DARK, Design, Inherit from panel.viewable import Viewable from panel.widgets import FloatSlider, IntSlider, TextInput +@pytest.fixture(autouse=True) +def _clear_state(): + state._stylesheets.clear() + + class DesignTest(Design): modifiers = {