MCPcopy Create free account
hub / github.com/holoviz/hvplot / test_hvplot_defaults

Method test_hvplot_defaults

hvplot/tests/testoptions.py:184–202  ·  view source on GitHub ↗
(self, df, backend)

Source from the content-addressed store, hash-verified

182 assert 'number' in plot.last.vdims
183
184 def test_hvplot_defaults(self, df, backend):
185 plot = df.hvplot.scatter('x', 'y', c='category')
186 opts = Store.lookup_options(backend, plot, 'plot')
187 if backend == 'bokeh':
188 assert opts.kwargs['height'] == 300
189 assert opts.kwargs['width'] == 700
190 elif backend == 'matplotlib':
191 assert opts.kwargs['aspect'] == pytest.approx(2.333333)
192 assert opts.kwargs['fig_size'] == pytest.approx(233.333333)
193 if backend == 'bokeh':
194 assert opts.kwargs['responsive'] is False
195 assert opts.kwargs['shared_axes'] is True
196 # legend_position shouldn't only be for Bokeh
197 assert opts.kwargs['legend_position'] == 'right'
198 assert opts.kwargs['show_grid'] is False
199 assert opts.kwargs['show_legend'] is True
200 assert opts.kwargs['logx'] is False
201 assert opts.kwargs['logy'] is False
202 assert opts.kwargs.get('logz') is None
203
204 @pytest.mark.parametrize(
205 'backend',

Callers

nothing calls this directly

Calls 1

scatterMethod · 0.45

Tested by

no test coverage detected