Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 35ba5a2

Browse files
Added discussion of how to test vline, hline, etc.
No tests written yet
1 parent f472458 commit 35ba5a2

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import plotly.graph_objs as go
2+
from plotly.subplots import make_subplots
3+
from plotly.basedatatypes import _indexing_combinations, _unzip_pairs
4+
import pytest
5+
6+
NROWS = 4
7+
NCOLS = 5
8+
9+
10+
@pytest.fixture
11+
def subplot_fig_fixture():
12+
fig = make_subplots(NROWS, NCOLS)
13+
return fig
14+
15+
16+
@pytest.fixture
17+
def non_subplot_fig_fixture():
18+
fig = go.Figure(go.Scatter(x=[1, 2, 3], y=[4, 3, 2]))
19+
return fig
20+
21+
22+
# stuff to test:
23+
# add_vline, hline etc. add the intended shape
24+
# - then WLOG maybe we can just test 1 of them, e.g., add_vline?
25+
# test that the addressing works correctly? this is already tested for add_shape...
26+
# make sure all the methods work for subplots and single plot
27+
# test edge-cases of _make_paper_spanning_shape: bad direction, bad shape (e.g., a path)

0 commit comments

Comments
 (0)