File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 1414)
1515
1616from .conftest import pickle_figure , registering_cleanup
17+ from .utils import decode_trace_bdata
1718
1819
1920def _get_hf_props (nb_samples : int ) -> dict :
@@ -32,12 +33,17 @@ def _check_correctly_serialized(
3233 for i in range (nb_traces ):
3334 trace = fig .data [i ]
3435 assert isinstance (trace , go .Scattergl )
35- assert len (trace .y ) == 50
36+ y_ = decode_trace_bdata (trace .y )
37+ assert len (y_ ) == 50
3638 assert len (trace .text ) == 50
3739 assert len (trace .hovertext ) == 50
38- assert len (trace .marker .size ) == 50
39- assert len (trace .marker .color ) == 50
40+ marker_size_ = decode_trace_bdata (trace .marker .size )
41+ assert len (marker_size_ ) == 50
42+
43+ marker_color_ = decode_trace_bdata (trace .marker .color )
44+ assert len (marker_color_ ) == 50
4045 assert f"trace--{ i } " in trace .name
46+
4147 hf_trace = fig .hf_data [i ]
4248 assert np .all (hf_trace ["y" ] == np .arange (nb_samples ))
4349 assert np .all (hf_trace ["text" ] == np .arange (nb_samples ).astype (str ))
You can’t perform that action at this time.
0 commit comments