From bc118a986bed352c46ce02589985615eef376ecb Mon Sep 17 00:00:00 2001 From: yangyangdotcom Date: Sat, 7 Oct 2023 10:26:58 -0500 Subject: [PATCH 1/2] Added test_hist --- lib/matplotlib/tests/test_datetime.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/matplotlib/tests/test_datetime.py b/lib/matplotlib/tests/test_datetime.py index 53958229f174..e792a41d8ecb 100644 --- a/lib/matplotlib/tests/test_datetime.py +++ b/lib/matplotlib/tests/test_datetime.py @@ -170,11 +170,20 @@ def test_hexbin(self): fig, ax = plt.subplots() ax.hexbin(...) - @pytest.mark.xfail(reason="Test for hist not written yet") + # Benjamin + # @pytest.mark.xfail(reason="Test for hist not written yet") @mpl.style.context("default") def test_hist(self): - fig, ax = plt.subplots() - ax.hist(...) + mpl.rcParams["date.converter"] = "concise" + N = 10 + fig, (ax1, ax2, ax3) = plt.subplots( + 3, 1, layout="constrained", figsize=(6, 10) + ) + + x = np.array([datetime.datetime(2023, 9, n) for n in range(1, N)]) + ax1.hist(x, range(1, N)) + ax2.hist(range(1, N), x) + ax3.hist(x, x) @pytest.mark.xfail(reason="Test for hist2d not written yet") @mpl.style.context("default") From 1dd3dddb0e813714dba73238f564bb30392513ab Mon Sep 17 00:00:00 2001 From: yangyangdotcom Date: Sat, 7 Oct 2023 10:34:41 -0500 Subject: [PATCH 2/2] reset --- lib/matplotlib/tests/test_datetime.py | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/lib/matplotlib/tests/test_datetime.py b/lib/matplotlib/tests/test_datetime.py index e792a41d8ecb..53958229f174 100644 --- a/lib/matplotlib/tests/test_datetime.py +++ b/lib/matplotlib/tests/test_datetime.py @@ -170,20 +170,11 @@ def test_hexbin(self): fig, ax = plt.subplots() ax.hexbin(...) - # Benjamin - # @pytest.mark.xfail(reason="Test for hist not written yet") + @pytest.mark.xfail(reason="Test for hist not written yet") @mpl.style.context("default") def test_hist(self): - mpl.rcParams["date.converter"] = "concise" - N = 10 - fig, (ax1, ax2, ax3) = plt.subplots( - 3, 1, layout="constrained", figsize=(6, 10) - ) - - x = np.array([datetime.datetime(2023, 9, n) for n in range(1, N)]) - ax1.hist(x, range(1, N)) - ax2.hist(range(1, N), x) - ax3.hist(x, x) + fig, ax = plt.subplots() + ax.hist(...) @pytest.mark.xfail(reason="Test for hist2d not written yet") @mpl.style.context("default") pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy