@@ -58,7 +58,8 @@ def format(request):
58
58
59
59
@pytest .fixture ()
60
60
def fig1 ():
61
- return go .Figure (data = [
61
+ pio .templates .default = None
62
+ yield go .Figure (data = [
62
63
go .Bar (y = [2 , 1 , 4 ],
63
64
marker = go .bar .Marker (color = 'purple' ,
64
65
opacity = 0.7 )),
@@ -69,10 +70,12 @@ def fig1():
69
70
'yaxis' : {'showticklabels' : False },
70
71
'showlegend' : False
71
72
})
73
+ pio .templates .default = 'plotly'
72
74
73
75
74
76
@pytest .fixture ()
75
77
def topofig ():
78
+ pio .templates .default = None
76
79
for col in topo_df .columns :
77
80
topo_df [col ] = topo_df [col ].astype (str )
78
81
@@ -115,11 +118,13 @@ def topofig():
115
118
font = {'family' : 'Arial' , 'size' : 12 },
116
119
)
117
120
118
- return dict (data = data , layout = layout )
121
+ yield dict (data = data , layout = layout )
122
+ pio .templates .default = 'plotly'
119
123
120
124
121
125
@pytest .fixture ()
122
126
def latexfig ():
127
+ pio .templates .default = None
123
128
trace1 = go .Scatter (
124
129
x = [1 , 2 , 3 , 4 ],
125
130
y = [1 , 4 , 9 , 16 ],
@@ -142,7 +147,8 @@ def latexfig():
142
147
font = {'family' : 'Arial' , 'size' : 12 }
143
148
)
144
149
fig = go .Figure (data = data , layout = layout )
145
- return fig
150
+ yield fig
151
+ pio .templates .default = 'plotly'
146
152
147
153
148
154
# Utilities
0 commit comments