File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -183,22 +183,16 @@ def _validate_date_converter(s):
183
183
cbook ._warn_external (f'date.converter string must be "auto" '
184
184
f'or "concise", not "{ s } ". Check your '
185
185
'matplotlibrc' )
186
- try :
187
- import matplotlib .dates as mdates
188
- mdates ._rcParam_helper .set_converter (s )
189
- except Exception as e :
190
- pass
186
+ import matplotlib .dates as mdates
187
+ mdates ._rcParam_helper .set_converter (s )
191
188
192
189
193
190
def _validate_date_int_mult (s ):
194
191
if s is None :
195
192
return
196
193
s = validate_bool (s )
197
- try :
198
- import matplotlib .dates as mdates
199
- mdates ._rcParam_helper .set_int_mult (s )
200
- except Exception as e :
201
- pass
194
+ import matplotlib .dates as mdates
195
+ mdates ._rcParam_helper .set_int_mult (s )
202
196
203
197
204
198
def _validate_tex_preamble (s ):
Original file line number Diff line number Diff line change @@ -977,6 +977,8 @@ def test_change_converter():
977
977
fig .canvas .draw ()
978
978
assert ax .get_xticklabels ()[0 ].get_text () == 'Jan 01 2020'
979
979
assert ax .get_xticklabels ()[1 ].get_text () == 'Jan 15 2020'
980
+ with pytest .warns (UserWarning ) as rec :
981
+ plt .rcParams ['date.converter' ] = 'boo'
980
982
981
983
982
984
def test_change_interval_multiples ():
You can’t perform that action at this time.
0 commit comments