File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import datetime
2- import tempfile
32
43import dateutil .tz
54import dateutil .rrule
65import numpy as np
76import pytest
87
9- from matplotlib .testing .decorators import image_comparison
10- import matplotlib .pyplot as plt
8+ from matplotlib import rc_context
119from matplotlib .cbook import MatplotlibDeprecationWarning
1210import matplotlib .dates as mdates
11+ import matplotlib .pyplot as plt
12+ from matplotlib .testing .decorators import image_comparison
1313import matplotlib .ticker as mticker
14- from matplotlib import rc_context
1514
1615
1716def test_date_numpyx ():
@@ -299,9 +298,8 @@ def test_empty_date_with_year_formatter():
299298 yearFmt = dates .DateFormatter ('%Y' )
300299 ax .xaxis .set_major_formatter (yearFmt )
301300
302- with tempfile .TemporaryFile () as fh :
303- with pytest .raises (ValueError ):
304- fig .savefig (fh )
301+ with pytest .raises (ValueError ):
302+ fig .canvas .draw ()
305303
306304
307305def test_auto_date_locator ():
You can’t perform that action at this time.
0 commit comments