Skip to content

Commit 849a69b

Browse files
Gh1147 Drop version restriction on matplotlib and prevent test to write to root folder
1 parent 7ec6308 commit 849a69b

File tree

2 files changed

+22
-16
lines changed

2 files changed

+22
-16
lines changed

pyproject.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pyright = ">=1.1.396"
4343
poethepoet = ">=0.16.5"
4444
loguru = ">=0.6.0"
4545
typing-extensions = ">=4.4.0"
46-
matplotlib = ">=3.5.10" # TODO https://github.com/pandas-dev/pandas/issues/58851
46+
matplotlib = ">=3.6.3"
4747
pre-commit = ">=2.19.0"
4848
black = ">=23.3.0"
4949
isort = ">=5.12.0"
@@ -230,8 +230,6 @@ ignore-words-list = "indext, mose, sav, ser"
230230
filterwarnings = [
231231
# treat warnings as errors
232232
"error",
233-
# until there is a new dateutil release: github.com/dateutil/dateutil/pull/1285
234-
# "ignore:datetime.datetime.utc:DeprecationWarning",
235233
]
236234

237235
# Next line needed to avoid poetry complaint

tests/test_plotting.py

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -605,20 +605,28 @@ def test_grouped_dataframe_boxplot(close_figures):
605605
check(assert_type(grouped.boxplot(), Series), Series)
606606
check(assert_type(grouped.boxplot(subplots=True), Series), Series)
607607

608+
609+
def test_grouped_dataframe_boxplot_single(close_figures):
610+
tuples = [t for t in itertools.product(range(10), range(2))]
611+
index = pd.MultiIndex.from_tuples(tuples, names=["lvl0", "lvl1"])
612+
df = pd.DataFrame(
613+
data=np.random.randn(len(index), 2), columns=["A", "B"], index=index
614+
)
615+
grouped = df.groupby(level="lvl1")
616+
608617
# a single plot
609-
# check(
610-
# assert_type(
611-
# grouped.boxplot(
612-
# subplots=False,
613-
# rot=45,
614-
# fontsize=12,
615-
# figsize=(8, 10),
616-
# orientation="horizontal",
617-
# ),
618-
# Axes,
619-
# ),
620-
# Axes,
621-
# )
618+
check(
619+
assert_type(
620+
grouped.boxplot(
621+
subplots=False,
622+
rot=45,
623+
fontsize=12,
624+
figsize=(8, 10),
625+
),
626+
Axes,
627+
),
628+
Axes,
629+
)
622630

623631
# not a literal bool
624632
check(assert_type(grouped.boxplot(subplots=bool(0.5)), Union[Axes, Series]), Series)

0 commit comments

Comments
 (0)