Skip to content

Commit 395a4af

Browse files
committed
add eager mathjax
1 parent 8eb89ba commit 395a4af

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

components/dash-core-components/tests/integration/graph/test_graph_varia.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -904,17 +904,19 @@ def load_chart(n_clicks):
904904
assert dash_dcc.get_logs() == []
905905

906906

907-
def test_grva011_without_mathjax(dash_dcc):
908-
app = Dash(__name__, eager_loading=False, assets_folder="../../assets")
907+
@pytest.mark.parametrize("is_eager", [True, False])
908+
def test_grva011_without_mathjax(dash_dcc, is_eager):
909+
app = Dash(__name__, eager_loading=is_eager, assets_folder="../../assets")
909910

910911
app.layout = html.Div([dcc.Graph(id="output", figure={"data": [{"y": [3, 1, 2]}]})])
911912

912913
dash_dcc.start_server(app)
913914
assert dash_dcc.get_logs() == []
914915

915916

916-
def test_grva012_with_mathjax(dash_dcc):
917-
app = Dash(__name__, eager_loading=False, assets_folder="../../assets")
917+
@pytest.mark.parametrize("is_eager", [True, False])
918+
def test_grva012_with_mathjax(dash_dcc, is_eager):
919+
app = Dash(__name__, eager_loading=is_eager, assets_folder="../../assets")
918920

919921
app.layout = html.Div(
920922
[

components/dash-core-components/tests/integration/markdown/test_markdown.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import pytest
12
from dash import Dash, dcc, html, Input, Output
23

34

@@ -93,7 +94,8 @@ def test_mkdw002_dcclink(dash_dcc):
9394
assert dash_dcc.get_logs() == []
9495

9596

96-
def test_mkdw003_without_mathjax(dash_dcc):
97+
@pytest.mark.parametrize("is_eager", [True, False])
98+
def test_mkdw003_without_mathjax(dash_dcc, is_eager):
9799
app = Dash(__name__)
98100

99101
app.layout = html.Div(
@@ -108,7 +110,8 @@ def test_mkdw003_without_mathjax(dash_dcc):
108110
assert dash_dcc.get_logs() == []
109111

110112

111-
def test_mkdw004_inline_mathjax(dash_dcc):
113+
@pytest.mark.parametrize("is_eager", [True, False])
114+
def test_mkdw004_inline_mathjax(dash_dcc, is_eager):
112115
app = Dash(__name__, eager_loading=False, assets_folder="../../assets")
113116

114117
app.layout = html.Div(
@@ -121,7 +124,8 @@ def test_mkdw004_inline_mathjax(dash_dcc):
121124
assert dash_dcc.get_logs() == []
122125

123126

124-
def test_mkdw005_block_mathjax(dash_dcc):
127+
@pytest.mark.parametrize("is_eager", [True, False])
128+
def test_mkdw005_block_mathjax(dash_dcc, is_eager):
125129
app = Dash(__name__, eager_loading=False, assets_folder="../../assets")
126130

127131
app.layout = html.Div(
@@ -145,7 +149,8 @@ def test_mkdw005_block_mathjax(dash_dcc):
145149
assert dash_dcc.get_logs() == []
146150

147151

148-
def test_mkdw006_toggle_mathjax(dash_dcc):
152+
@pytest.mark.parametrize("is_eager", [True, False])
153+
def test_mkdw006_toggle_mathjax(dash_dcc, is_eager):
149154
app = Dash(__name__)
150155

151156
gravity = "$F=\\frac{Gm_1m_2}{r^2}$"
@@ -192,7 +197,8 @@ def toggle(n):
192197
assert dash_dcc.driver.execute_script("return !!window.MathJax")
193198

194199

195-
def test_mkdw007_load_mathjax(dash_dcc):
200+
@pytest.mark.parametrize("is_eager", [True, False])
201+
def test_mkdw007_load_mathjax(dash_dcc, is_eager):
196202
app = Dash(__name__)
197203

198204
gravity = "$F=\\frac{Gm_1m_2}{r^2}$"

0 commit comments

Comments
 (0)