From 7de7def9b59d2de6eccbfe98fc0583644bfa0969 Mon Sep 17 00:00:00 2001 From: Noko-Github Date: Sat, 25 Nov 2023 16:20:17 +0900 Subject: [PATCH] Add a test case Add a test case to test_relational.py and a fixture empty dataframe. --- tests/conftest.py | 5 +++++ tests/test_relational.py | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 6ee53e7ee4..dc13dda193 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -166,6 +166,11 @@ def null_df(rng, long_df): return df +@pytest.fixture +def empty_df(long_df): + return long_df.drop(long_df.index) + + @pytest.fixture def object_df(rng, long_df): diff --git a/tests/test_relational.py b/tests/test_relational.py index 4c7ff43ee9..b8a857660f 100644 --- a/tests/test_relational.py +++ b/tests/test_relational.py @@ -1219,7 +1219,7 @@ def test_lineplot_smoke( wide_df, wide_array, wide_list_of_series, wide_list_of_arrays, wide_list_of_lists, flat_array, flat_series, flat_list, - long_df, null_df, object_df + long_df, null_df, object_df, empty_df ): f, ax = plt.subplots() @@ -1302,6 +1302,9 @@ def test_lineplot_smoke( lineplot(x="x", y="y", hue="f", size="s", data=object_df) ax.clear() + lineplot(x="x", y="y", hue="a", data=empty_df) + ax.clear() + def test_ci_deprecation(self, long_df): axs = plt.figure().subplots(2)