Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 013472e

Browse files
Added smoke test for Axes.matshow to test_datetime.py
1 parent 8fa89d6 commit 013472e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/matplotlib/tests/test_datetime.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,8 +545,12 @@ def test_loglog(self):
545545
@pytest.mark.xfail(reason="Test for matshow not written yet")
546546
@mpl.style.context("default")
547547
def test_matshow(self):
548+
a = np.zeros((10, 10))
549+
dt_start = datetime.datetime(2010, 1, 1)
550+
dt_end = datetime.datetime(2020, 1, 1)
551+
extent = (dt_start, dt_end, dt_end, dt_start)
548552
fig, ax = plt.subplots()
549-
ax.matshow(...)
553+
ax.matshow(a, extent=extent)
550554

551555
@pytest.mark.xfail(reason="Test for pcolor not written yet")
552556
@mpl.style.context("default")

0 commit comments

Comments
 (0)