MCPcopy Index your code
hub / github.com/plotly/plotly.py / test_auto_histfunc

Function test_auto_histfunc

tests/test_optional/test_px/test_px_input.py:634–643  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

632
633
634def test_auto_histfunc():
635 a = [1, 2]
636 assert px.histogram(x=a).data[0].histfunc is None
637 assert px.histogram(y=a).data[0].histfunc is None
638 assert px.histogram(x=a, y=a).data[0].histfunc == "sum"
639 assert px.histogram(x=a, y=a, histfunc="avg").data[0].histfunc == "avg"
640
641 assert px.density_heatmap(x=a, y=a).data[0].histfunc is None
642 assert px.density_heatmap(x=a, y=a, z=a).data[0].histfunc == "sum"
643 assert px.density_heatmap(x=a, y=a, z=a, histfunc="avg").data[0].histfunc == "avg"
644
645
646@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 1

histogramMethod · 0.80

Tested by

no test coverage detected