@@ -274,13 +274,16 @@ def test_encode_customdata_datetime_series(self):
274
274
)
275
275
276
276
def test_encode_customdata_datetime_homogenous_dataframe (self ):
277
- df = pd .DataFrame (dict (
278
- t1 = pd .to_datetime (["2010-01-01" , "2010-01-02" ]),
279
- t2 = pd .to_datetime (["2011-01-01" , "2011-01-02" ]),
280
- ))
277
+ df = pd .DataFrame (
278
+ dict (
279
+ t1 = pd .to_datetime (["2010-01-01" , "2010-01-02" ]),
280
+ t2 = pd .to_datetime (["2011-01-01" , "2011-01-02" ]),
281
+ )
282
+ )
281
283
# 2D customdata
282
284
fig = Figure (
283
- Scatter (x = df ["t1" ], customdata = df [["t1" , "t2" ]]), layout = dict (template = "none" )
285
+ Scatter (x = df ["t1" ], customdata = df [["t1" , "t2" ]]),
286
+ layout = dict (template = "none" ),
284
287
)
285
288
fig_json = _json .dumps (
286
289
fig , cls = utils .PlotlyJSONEncoder , separators = ("," , ":" ), sort_keys = True
@@ -294,10 +297,9 @@ def test_encode_customdata_datetime_homogenous_dataframe(self):
294
297
)
295
298
296
299
def test_encode_customdata_datetime_inhomogenous_dataframe (self ):
297
- df = pd .DataFrame (dict (
298
- t = pd .to_datetime (["2010-01-01" , "2010-01-02" ]),
299
- v = np .arange (2 ),
300
- ))
300
+ df = pd .DataFrame (
301
+ dict (t = pd .to_datetime (["2010-01-01" , "2010-01-02" ]), v = np .arange (2 ),)
302
+ )
301
303
# 2D customdata
302
304
fig = Figure (
303
305
Scatter (x = df ["t" ], customdata = df [["t" , "v" ]]), layout = dict (template = "none" )
@@ -337,8 +339,8 @@ def test_numpy_datetime64(self):
337
339
j1 = _json .dumps (a , cls = utils .PlotlyJSONEncoder )
338
340
assert (
339
341
j1 == '["2011-07-11T00:00:00.000000000", '
340
- '"2011-07-12T00:00:00.000000000", '
341
- '"2011-07-13T00:00:00.000000000"]'
342
+ '"2011-07-12T00:00:00.000000000", '
343
+ '"2011-07-13T00:00:00.000000000"]'
342
344
)
343
345
344
346
def test_pil_image_encoding (self ):
0 commit comments