Skip to content

Commit af9c758

Browse files
Trying to write some tests.
1 parent e96138b commit af9c758

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
from unittest import TestCase
2+
3+
import plotly.graph_objs as go
4+
from plotly.subplots import make_subplots
5+
6+
__doc__ = """
7+
To test:
8+
We need to test add_annotation, add_shape, add_layout_image
9+
10+
The possible entries for row and col are:
11+
12+
code, type
13+
ia: (int,'all')
14+
lea: (list,'all')
15+
a: 'all'
16+
i: int
17+
le: list, len equals other list len
18+
lu: list, len unequal
19+
20+
# Rather than test this huge space of function inputs, let's break it down:
21+
22+
Test if (int,'all') (list,'all') ('all',int) ('all',list) set an "all" flag (also test that not this doesn't set the all flag e.g., int, list (int,'notall'),etc.)
23+
24+
Test the combinations formed by taking the cartesian product {a,i,l}x{a,i,l} and just see if they give the predicted index pairs.
25+
26+
Test to see if the part of the code that iterates through the plots works, e.g., check that empty list does nothing and list of (row,col) pairs does work.
27+
28+
Check to see that range is converted to list when passed in these forms (range,'all') range etc.
29+
"""
30+
31+
32+
class TestAddForEachAnnotationType(TestCase):
33+
pass

0 commit comments

Comments
 (0)