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

Function test_lines_data

tests/test_optional/test_matplotlylib/test_data.py:33–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31
32@pytest.mark.skip
33def test_lines_data():
34 fig, ax = plt.subplots()
35 ax.plot(D["x1"], D["y1"])
36 ax.plot(D["x2"], D["y2"])
37 renderer = run_fig(fig)
38 for xi, xf, yi, yf in zip(
39 renderer.plotly_fig["data"][0]["x"],
40 D["x1"],
41 renderer.plotly_fig["data"][0]["y"],
42 D["y1"],
43 ):
44 assert xi == xf, (
45 str(renderer.plotly_fig["data"][0]["x"]) + " is not " + str(D["x1"])
46 )
47 assert yi == yf, (
48 str(renderer.plotly_fig["data"][0]["y"]) + " is not " + str(D["y1"])
49 )
50 for xi, xf, yi, yf in zip(
51 renderer.plotly_fig["data"][1]["x"],
52 D["x2"],
53 renderer.plotly_fig["data"][1]["y"],
54 D["y2"],
55 ):
56 assert xi == xf, (
57 str(renderer.plotly_fig["data"][1]["x"]) + " is not " + str(D["x2"])
58 )
59 assert yi == yf, (
60 str(renderer.plotly_fig["data"][0]["y"]) + " is not " + str(D["y2"])
61 )
62
63
64@pytest.mark.skip

Callers

nothing calls this directly

Calls 2

run_figFunction · 0.85
subplotsMethod · 0.80

Tested by

no test coverage detected