From: <jd...@us...> - 2009-09-08 15:49:46
|
Revision: 7714 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7714&view=rev Author: jdh2358 Date: 2009-09-08 15:49:37 +0000 (Tue, 08 Sep 2009) Log Message: ----------- store old rc params before tests and then update after Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/__init__.py Modified: trunk/matplotlib/lib/matplotlib/__init__.py =================================================================== --- trunk/matplotlib/lib/matplotlib/__init__.py 2009-09-08 15:23:02 UTC (rev 7713) +++ trunk/matplotlib/lib/matplotlib/__init__.py 2009-09-08 15:49:37 UTC (rev 7714) @@ -893,7 +893,15 @@ import nose.plugins.builtin from testing.noseclasses import KnownFailure from nose.plugins.manager import PluginManager + + backend = rcParams['backend'] + use('Agg') # use Agg backend for these tests + + # store the old values before overriding + overrides = 'font.family', 'text.hinting' + stored = dict([(k, rcParams[k]) for k in overrides]) + rcParams['font.family'] = 'Bitstream Vera Sans' rcParams['text.hinting'] = False plugins = [] @@ -906,6 +914,11 @@ success = nose.run( defaultTest=default_test_modules, config=config, ) + # restore the old rc values + rcParams.update(stored) + + # restore the old backend + use(backend) return success test.__test__ = False # nose: this function is not a test This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |