Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2632ac9

Browse filesBrowse files
authored
Merge pull request #16973 from tacaswell/tst_speedup_too_many_ticks
TST: don't actually render 1k+ date ticks
2 parents 338e1e9 + 4389648 commit 2632ac9
Copy full SHA for 2632ac9

File tree

Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed
Open diff view settings
Collapse file

‎lib/matplotlib/tests/test_dates.py‎

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_dates.py
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,13 +152,15 @@ def test_too_many_date_ticks(caplog):
152152
'Attempting to set identical left == right' in str(rec[0].message)
153153
ax.plot([], [])
154154
ax.xaxis.set_major_locator(mdates.DayLocator())
155-
fig.canvas.draw()
155+
v = ax.xaxis.get_major_locator()()
156+
assert len(v) > 1000
156157
# The warning is emitted multiple times because the major locator is also
157158
# called both when placing the minor ticks (for overstriking detection) and
158159
# during tick label positioning.
159160
assert caplog.records and all(
160161
record.name == "matplotlib.ticker" and record.levelname == "WARNING"
161162
for record in caplog.records)
163+
assert len(caplog.records) > 0
162164

163165

164166
@image_comparison(['RRuleLocator_bounds.png'])

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.