Skip to content

Commit e3abb2e

Browse files
committed
Added test for singular float xmin/xmax arguments
1 parent f4af444 commit e3abb2e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/matplotlib/tests/test_datetime.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ def test_hist2d(self):
221221
@mpl.style.context("default")
222222
def test_hlines(self):
223223
mpl.rcParams["date.converter"] = 'concise'
224-
fig, axs = plt.subplots(2, 3, layout='constrained')
224+
fig, axs = plt.subplots(2, 4, layout='constrained')
225225
dateStrs = ['2023-03-08',
226226
'2023-04-09',
227227
'2023-05-13',
@@ -240,6 +240,9 @@ def test_hlines(self):
240240
axs[0, 2].hlines(dates,
241241
xmin=date_start,
242242
xmax=date_end)
243+
axs[0, 3].hlines(dates,
244+
xmin=0.45,
245+
xmax=0.65)
243246
axs[1, 0].hlines(y=npDates,
244247
xmin=[0.5, 0.6, 0.7, 0.8, 0.9],
245248
xmax=[0.1, 0.2, 0.3, 0.4, 0.5])
@@ -249,6 +252,9 @@ def test_hlines(self):
249252
axs[1, 1].hlines(npDates,
250253
xmin=datetime.datetime(2020, 5, 10),
251254
xmax=datetime.datetime(2020, 5, 31))
255+
axs[1, 3].hlines(npDates,
256+
xmin=0.45,
257+
xmax=0.65)
252258

253259
@pytest.mark.xfail(reason="Test for imshow not written yet")
254260
@mpl.style.context("default")

0 commit comments

Comments
 (0)