Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit70ae36f

Browse files
committed
TST: don't actually render 1k+ date ticks
It is enough to ask the locator what ticks it would have (withouttrying to render them all)
1 parent338e1e9 commit70ae36f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎lib/matplotlib/tests/test_dates.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,14 +152,15 @@ def test_too_many_date_ticks(caplog):
152152
'Attempting to set identical left == right'instr(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+
assertlen(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
assertcaplog.recordsandall(
160161
record.name=="matplotlib.ticker"andrecord.levelname=="WARNING"
161162
forrecordincaplog.records)
162-
163+
assertlen(caplog.records)>0
163164

164165
@image_comparison(['RRuleLocator_bounds.png'])
165166
deftest_RRuleLocator():

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp