File tree 1 file changed +5
-7
lines changed 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 1
1
import datetime
2
- import tempfile
3
2
4
3
import dateutil .tz
5
4
import dateutil .rrule
6
5
import numpy as np
7
6
import pytest
8
7
9
- from matplotlib .testing .decorators import image_comparison
10
- import matplotlib .pyplot as plt
8
+ from matplotlib import rc_context
11
9
from matplotlib .cbook import MatplotlibDeprecationWarning
12
10
import matplotlib .dates as mdates
11
+ import matplotlib .pyplot as plt
12
+ from matplotlib .testing .decorators import image_comparison
13
13
import matplotlib .ticker as mticker
14
- from matplotlib import rc_context
15
14
16
15
17
16
def test_date_numpyx ():
@@ -299,9 +298,8 @@ def test_empty_date_with_year_formatter():
299
298
yearFmt = dates .DateFormatter ('%Y' )
300
299
ax .xaxis .set_major_formatter (yearFmt )
301
300
302
- with tempfile .TemporaryFile () as fh :
303
- with pytest .raises (ValueError ):
304
- fig .savefig (fh )
301
+ with pytest .raises (ValueError ):
302
+ fig .canvas .draw ()
305
303
306
304
307
305
def test_auto_date_locator ():
You can’t perform that action at this time.
0 commit comments