44import functools
55import warnings
66
7- import matplotlib
8- from matplotlib import cbook , rcParams , rcdefaults , use
7+ import matplotlib as mpl
8+ from matplotlib import cbook
99
1010
1111def _is_list_like (obj ):
@@ -15,7 +15,7 @@ def _is_list_like(obj):
1515
1616def is_called_from_pytest ():
1717 """Returns whether the call was done from pytest"""
18- return getattr (matplotlib , '_called_from_pytest' , False )
18+ return getattr (mpl , '_called_from_pytest' , False )
1919
2020
2121def _copy_metadata (src_func , tgt_func ):
@@ -26,13 +26,13 @@ def _copy_metadata(src_func, tgt_func):
2626
2727
2828def set_font_settings_for_testing ():
29- rcParams ['font.family' ] = 'DejaVu Sans'
30- rcParams ['text.hinting' ] = False
31- rcParams ['text.hinting_factor' ] = 8
29+ mpl . rcParams ['font.family' ] = 'DejaVu Sans'
30+ mpl . rcParams ['text.hinting' ] = False
31+ mpl . rcParams ['text.hinting_factor' ] = 8
3232
3333
3434def set_reproducibility_for_testing ():
35- rcParams ['svg.hashsalt' ] = 'matplotlib'
35+ mpl . rcParams ['svg.hashsalt' ] = 'matplotlib'
3636
3737
3838def setup ():
@@ -51,12 +51,12 @@ def setup():
5151 "Could not set locale to English/United States. "
5252 "Some date-related tests may fail" )
5353
54- use ('Agg' , warn = False ) # use Agg backend for these tests
54+ mpl . use ('Agg' , warn = False ) # use Agg backend for these tests
5555
5656 # These settings *must* be hardcoded for running the comparison
5757 # tests and are not necessarily the default values as specified in
5858 # rcsetup.py
59- rcdefaults () # Start with all defaults
59+ mpl . rcdefaults () # Start with all defaults
6060
6161 set_font_settings_for_testing ()
6262 set_reproducibility_for_testing ()
0 commit comments