Skip to content

TST: don't actually render 1k+ date ticks #16973

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 31, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/matplotlib/tests/test_dates.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,15 @@ def test_too_many_date_ticks(caplog):
'Attempting to set identical left == right' in str(rec[0].message)
ax.plot([], [])
ax.xaxis.set_major_locator(mdates.DayLocator())
fig.canvas.draw()
v = ax.xaxis.get_major_locator()()
assert len(v) > 1000
# The warning is emitted multiple times because the major locator is also
# called both when placing the minor ticks (for overstriking detection) and
# during tick label positioning.
assert caplog.records and all(
record.name == "matplotlib.ticker" and record.levelname == "WARNING"
for record in caplog.records)
assert len(caplog.records) > 0


@image_comparison(['RRuleLocator_bounds.png'])
Expand Down