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

Function test_explorer_plot_code

hvplot/tests/testui.py:50–84  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

48
49
50def test_explorer_plot_code():
51 explorer = hvplot.explorer(df)
52
53 explorer.param.update(
54 kind='scatter',
55 x='bill_length_mm',
56 y_multi=['bill_depth_mm'],
57 by=['species'],
58 )
59
60 hvplot_code = explorer.plot_code()
61
62 assert hvplot_code == (
63 'df.hvplot(\n'
64 " by=['species'],\n"
65 " kind='scatter',\n"
66 " x='bill_length_mm',\n"
67 " y=['bill_depth_mm'],\n"
68 " legend='bottom_right',\n"
69 " widget_location='bottom',\n"
70 ')'
71 )
72
73 hvplot_code = explorer.plot_code(var_name='othername')
74
75 assert hvplot_code == (
76 'othername.hvplot(\n'
77 " by=['species'],\n"
78 " kind='scatter',\n"
79 " x='bill_length_mm',\n"
80 " y=['bill_depth_mm'],\n"
81 " legend='bottom_right',\n"
82 " widget_location='bottom',\n"
83 ')'
84 )
85
86
87def test_explorer_hvplot():

Callers

nothing calls this directly

Calls 2

explorerMethod · 0.80
plot_codeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…