Skip to content

Commit e98c7a1

Browse files
committed
fix test
1 parent d0cf600 commit e98c7a1

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

extras/test_notebooks.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,17 @@ def test_chart_titles(file):
125125
check_plots(cell.source)
126126

127127

128+
def is_plotly_output(output):
129+
return "application/vnd.plotly.v1+json" in output.data
130+
131+
132+
def is_text_or_table_output(output):
133+
return output.output_type in [
134+
"display_data",
135+
"execute_result",
136+
] and not is_plotly_output(output)
137+
138+
128139
def num_lines(output):
129140
html = output.data.get("text/html")
130141
if html:
@@ -142,7 +153,7 @@ def test_long_outputs_scrolled(file):
142153
for cell in notebook.cells:
143154
if is_python(cell):
144155
for output in cell.outputs:
145-
if output.output_type in ["display_data", "execute_result"]:
156+
if is_text_or_table_output(output):
146157
num_rows = num_lines(output)
147158
if num_rows > 30:
148159
# if not set, the notebook will automatically scroll

0 commit comments

Comments
 (0)