Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 24 additions & 24 deletions tests/test_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,10 @@ def test_bootstrap_plot(close_figures: None) -> None:

def test_hist(close_figures: None) -> None:
df = pd.DataFrame({"Col1": [1, 2], "Col4": [2, 1]})
check(assert_type(df.hist(), npt.NDArray[np.object_]), npt.NDArray[np.object_])
check(assert_type(df.hist(), npt.NDArray[np.object_]), np.ndarray)
check(
assert_type(df.hist(by="Col4"), npt.NDArray[np.object_]),
npt.NDArray[np.object_],
np.ndarray,
)


Expand Down Expand Up @@ -380,7 +380,7 @@ def test_scatter_matrix(close_figures: None) -> None:
pd.plotting.scatter_matrix(df, alpha=0.2),
npt.NDArray[np.object_],
),
npt.NDArray[np.object_],
np.ndarray,
)


Expand All @@ -399,14 +399,14 @@ def test_plot_line() -> None:
IRIS_DF.plot.line(subplots=True),
npt.NDArray[np.object_],
),
npt.NDArray[np.object_],
np.ndarray,
)
check(
assert_type(
IRIS_DF.plot(kind="line", subplots=True),
npt.NDArray[np.object_],
),
npt.NDArray[np.object_],
np.ndarray,
)


Expand All @@ -418,14 +418,14 @@ def test_plot_area(close_figures: None) -> None:
IRIS_DF.plot.area(subplots=True),
npt.NDArray[np.object_],
),
npt.NDArray[np.object_],
np.ndarray,
)
check(
assert_type(
IRIS_DF.plot(kind="area", subplots=True),
npt.NDArray[np.object_],
),
npt.NDArray[np.object_],
np.ndarray,
)


Expand All @@ -437,14 +437,14 @@ def test_plot_bar(close_figures: None) -> None:
IRIS_DF.plot.bar(subplots=True),
npt.NDArray[np.object_],
),
npt.NDArray[np.object_],
np.ndarray,
)
check(
assert_type(
IRIS_DF.plot(kind="bar", subplots=True),
npt.NDArray[np.object_],
),
npt.NDArray[np.object_],
np.ndarray,
)


Expand All @@ -456,14 +456,14 @@ def test_plot_barh(close_figures: None) -> None:
IRIS_DF.plot.barh(subplots=True),
npt.NDArray[np.object_],
),
npt.NDArray[np.object_],
np.ndarray,
)
check(
assert_type(
IRIS_DF.plot(kind="barh", subplots=True),
npt.NDArray[np.object_],
),
npt.NDArray[np.object_],
np.ndarray,
)


Expand Down Expand Up @@ -494,14 +494,14 @@ def test_plot_density(close_figures: None) -> None:
IRIS_DF.plot.density(subplots=True),
npt.NDArray[np.object_],
),
npt.NDArray[np.object_],
np.ndarray,
)
check(
assert_type(
IRIS_DF.plot(kind="density", subplots=True),
npt.NDArray[np.object_],
),
npt.NDArray[np.object_],
np.ndarray,
)


Expand All @@ -519,14 +519,14 @@ def test_plot_hexbin(close_figures: None) -> None:
IRIS_DF.plot.hexbin(x="SepalLength", y="SepalWidth", subplots=True),
npt.NDArray[np.object_],
),
npt.NDArray[np.object_],
np.ndarray,
)
check(
assert_type(
IRIS_DF.plot(kind="hexbin", x="SepalLength", y="SepalWidth", subplots=True),
npt.NDArray[np.object_],
),
npt.NDArray[np.object_],
np.ndarray,
)


Expand All @@ -538,14 +538,14 @@ def test_plot_hist(close_figures: None) -> None:
IRIS_DF.plot.hist(subplots=True),
npt.NDArray[np.object_],
),
npt.NDArray[np.object_],
np.ndarray,
)
check(
assert_type(
IRIS_DF.plot(subplots=True, kind="hist"),
npt.NDArray[np.object_],
),
npt.NDArray[np.object_],
np.ndarray,
)


Expand All @@ -557,14 +557,14 @@ def test_plot_kde(close_figures: None) -> None:
IRIS_DF.plot.kde(subplots=True),
npt.NDArray[np.object_],
),
npt.NDArray[np.object_],
np.ndarray,
)
check(
assert_type(
IRIS_DF.plot(subplots=True, kind="kde"),
npt.NDArray[np.object_],
),
npt.NDArray[np.object_],
np.ndarray,
)


Expand All @@ -576,15 +576,15 @@ def test_plot_pie(close_figures: None) -> None:
IRIS_DF.plot.pie(y="SepalLength", subplots=True),
npt.NDArray[np.object_],
),
npt.NDArray[np.object_],
np.ndarray,
)

check(
assert_type(
IRIS_DF.plot(kind="pie", y="SepalLength", subplots=True),
npt.NDArray[np.object_],
),
npt.NDArray[np.object_],
np.ndarray,
)


Expand All @@ -604,7 +604,7 @@ def test_plot_scatter(close_figures: None) -> None:
IRIS_DF.plot.scatter(x="SepalLength", y="SepalWidth", subplots=True),
npt.NDArray[np.object_],
),
npt.NDArray[np.object_],
np.ndarray,
)
check(
assert_type(
Expand All @@ -613,7 +613,7 @@ def test_plot_scatter(close_figures: None) -> None:
),
npt.NDArray[np.object_],
),
npt.NDArray[np.object_],
np.ndarray,
)


Expand Down Expand Up @@ -697,7 +697,7 @@ def test_plot_subplot_changes_150() -> None:
assert_type(
df.plot(subplots=[("a", "b"), ("c", "d")]), npt.NDArray[np.object_]
),
npt.NDArray[np.object_],
np.ndarray,
)


Expand Down