()
| 411 | |
| 412 | |
| 413 | def test_non_matching_index(): |
| 414 | df = pd.DataFrame(dict(y=[1, 2, 3]), index=["a", "b", "c"]) |
| 415 | |
| 416 | expected = pd.DataFrame(dict(index=["a", "b", "c"], y=[1, 2, 3])) |
| 417 | |
| 418 | args = dict(data_frame=df, x=df.index, y="y") |
| 419 | out = build_dataframe(args, go.Scatter) |
| 420 | assert_frame_equal(expected, out["data_frame"].to_pandas()) |
| 421 | |
| 422 | expected = pd.DataFrame(dict(x=["a", "b", "c"], y=[1, 2, 3])) |
| 423 | |
| 424 | args = dict(data_frame=None, x=df.index, y=df.y) |
| 425 | out = build_dataframe(args, go.Scatter) |
| 426 | assert_frame_equal(expected, out["data_frame"].to_pandas()) |
| 427 | |
| 428 | args = dict(data_frame=None, x=["a", "b", "c"], y=df.y) |
| 429 | out = build_dataframe(args, go.Scatter) |
| 430 | assert_frame_equal(expected, out["data_frame"].to_pandas()) |
| 431 | |
| 432 | |
| 433 | def test_splom_case(backend): |
nothing calls this directly
no test coverage detected