importmatplotlib.pyplotaspltfrommatplotlib.texmanagerimportTexManagerdeftest_fontconfig_preamble():""" Test that the preamble is included in _fontconfig """plt.rcParams['text.usetex']=Truetm1=TexManager()font_config1=tm1.get_font_config()plt.rcParams['text.latex.preamble']=['\\usepackage{txfonts}']tm2=TexManager()font_config2=tm2.get_font_config()assertfont_config1!=font_config2