def test_fontconfig_preamble():
 plt.rcParams[u'text.usetex'] = True
 tm1 = TexManager()
 font_config1 = tm1.get_font_config()
 plt.rcParams[u'text.latex.preamble'] = [u'\\usepackage{txfonts}']
 tm2 = TexManager()
 font_config2 = tm2.get_font_config()
 assert (font_config1 != font_config2)

def test_fontconfig_preamble ( ) : plt . rcParams [ u'text.usetex' ] = True tm1 = TexManager ( ) font_config1 = tm1 . get_font_config ( ) plt . rcParams [ u'text.latex.preamble' ] = [ u'\\usepackage{txfonts}' ] tm2 = TexManager ( ) font_config2 = tm2 . get_font_config ( ) assert ( font_config1 != font_config2 )
test that the preamble is included in _fontconfig .