importmatplotlibimportmatplotlib.rcsetupdeftest_use_doc_standard_backends():""" Test that the standard backends mentioned in the docstring of matplotlib.use() are the same as in matplotlib.rcsetup. """defparse(key):backends=[]forlineinmatplotlib.use.__doc__.split(key)[1].split('\n'):ifnotline.strip():breakbackends+=[e.strip()foreinline.split(',')ife]returnbackendsassert(set(parse('- interactive backends:\n'))==set(matplotlib.rcsetup.interactive_bk))assert(set(parse('- non-interactive backends:\n'))==set(matplotlib.rcsetup.non_interactive_bk))