Make fontsize tests compatible with latest Bokeh
@@ -40,6 +40,9 @@ class TestElementPlot(LoggingComparisonTestCase, TestBokehPlot):
fig = plot.state
xaxis = plot.handles['xaxis']
yaxis = plot.handles['yaxis']
+ if bokeh_version > '2.2.3':
+ self.assertEqual(fig.title.text_font_size, '24pt')
+ else:
self.assertEqual(fig.title.text_font_size, {'value': '24pt'})
if bokeh_version < '2.0.2':
self.assertEqual(xaxis.axis_label_text_font_size, '20pt')
@@ -58,6 +61,9 @@ class TestElementPlot(LoggingComparisonTestCase, TestBokehPlot):
fig = plot.state
xaxis = plot.handles['xaxis']
yaxis = plot.handles['yaxis']
+ if bokeh_version > '2.2.3':
+ self.assertEqual(fig.title.text_font_size, '28pt')
+ else:
self.assertEqual(fig.title.text_font_size, {'value': '28pt'})
self.assertEqual(xaxis.axis_label_text_font_size, '28pt')
self.assertEqual(yaxis.axis_label_text_font_size, '28pt')
@@ -76,6 +82,9 @@ class TestElementPlot(LoggingComparisonTestCase, TestBokehPlot):
fig = plot.state
xaxis = plot.handles['xaxis']
yaxis = plot.handles['yaxis']
+ if bokeh_version > '2.2.3':
+ self.assertEqual(fig.title.text_font_size, '200%')
+ else:
self.assertEqual(fig.title.text_font_size, {'value': '200%'})
self.assertEqual(xaxis.axis_label_text_font_size, '24pt')
self.assertEqual(xaxis.major_label_text_font_size, '2.4em')
