FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Added test for tricontour in test_datetime.py by maryamyounis · Pull Request #27494 · matplotlib/matplotlib · GitHub

Repository navigation

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
16 changes: 12 additions & 4 deletions lib/matplotlib/tests/test_datetime.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -734,11 +734,19 @@ def test_tricontour(self):
fig, ax = plt.subplots()
ax.tricontour(...)

@pytest.mark.xfail(reason="Test for tricontourf not written yet")
@mpl.style.context("default")
def test_tricontourf(self):
fig, ax = plt.subplots()
ax.tricontourf(...)
def test_tricontour(self):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It looks like you wrote the test for tricontour (the unfilled variant), but deleted the stub for tricontourf (the filled variant)

mpl.rcParams["date.converter"] = "concise"
fig, ax = plt.subplots()
range_threshold = 10
np.random.seed(19680801)
x_dates = np.array(
[datetime.datetime(2023, 10, n) for n in range(1, range_threshold)]
)
x_dates_numeric = mpl.dates.date2num(x_dates)
y_data = np.random.rand(range_threshold - 1) * range_threshold
z_data = np.sin(x_dates_numeric) + y_data**2


@pytest.mark.xfail(reason="Test for tripcolor not written yet")
@mpl.style.context("default")
Expand Down
Loading

Back | FazBrowse Home | New Git URL