From: <as...@us...> - 2009-09-07 20:05:20
|
Revision: 7694 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7694&view=rev Author: astraw Date: 2009-09-07 20:05:12 +0000 (Mon, 07 Sep 2009) Log Message: ----------- test conversion: move old-style test to new-style test Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/tests/test_axes.py trunk/matplotlib/test/test_plots/TestSpan.py Added Paths: ----------- trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_axes/axvspan_epoch.png Removed Paths: ------------- trunk/matplotlib/test/test_plots/baseline/TestSpan/axvspan_epoch.png Copied: trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_axes/axvspan_epoch.png (from rev 7693, trunk/matplotlib/test/test_plots/baseline/TestSpan/axvspan_epoch.png) =================================================================== (Binary files differ) Modified: trunk/matplotlib/lib/matplotlib/tests/test_axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/tests/test_axes.py 2009-09-07 20:04:56 UTC (rev 7693) +++ trunk/matplotlib/lib/matplotlib/tests/test_axes.py 2009-09-07 20:05:12 UTC (rev 7694) @@ -312,3 +312,25 @@ # polar( x2, y2, color = "green" ) fig.savefig( 'polar_units' ) + +@image_comparison(baseline_images=['axvspan_epoch']) +def test_axvspan_epoch(): + """Test the axvspan method with Epochs.""" + from datetime import datetime + import matplotlib.testing.jpl_units as units + units.register() + + # generate some data + t0 = units.Epoch( "ET", dt=datetime(2009, 1, 20) ) + tf = units.Epoch( "ET", dt=datetime(2009, 1, 21) ) + + dt = units.Duration( "ET", units.day.convert( "sec" ) ) + + fig = pylab.figure() + + pylab.axvspan( t0, tf, facecolor="blue", alpha=0.25 ) + + ax = pylab.gca() + ax.set_xlim( t0 - 5.0*dt, tf + 5.0*dt ) + + fig.savefig( 'axvspan_epoch' ) Modified: trunk/matplotlib/test/test_plots/TestSpan.py =================================================================== --- trunk/matplotlib/test/test_plots/TestSpan.py 2009-09-07 20:04:56 UTC (rev 7693) +++ trunk/matplotlib/test/test_plots/TestSpan.py 2009-09-07 20:05:12 UTC (rev 7694) @@ -42,28 +42,6 @@ pass #-------------------------------------------------------------------- - def test_axvspan_epoch( self ): - """Test the axvspan method with Epochs.""" - - fname = self.outFile( "axvspan_epoch.png" ) - - # generate some data - t0 = units.Epoch( "ET", dt=datetime(2009, 1, 20) ) - tf = units.Epoch( "ET", dt=datetime(2009, 1, 21) ) - - dt = units.Duration( "ET", units.day.convert( "sec" ) ) - - fig = pylab.figure() - - pylab.axvspan( t0, tf, facecolor="blue", alpha=0.25 ) - - ax = pylab.gca() - ax.set_xlim( t0 - 5.0*dt, tf + 5.0*dt ) - - fig.savefig( fname ) - self.checkImage( fname ) - - #-------------------------------------------------------------------- def test_axhspan_epoch( self ): """Test the axhspan method with Epochs.""" Deleted: trunk/matplotlib/test/test_plots/baseline/TestSpan/axvspan_epoch.png =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |