Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8a6632f

Browse files
committed
test conversion: move old-style test to new-style test
svn path=/trunk/matplotlib/; revision=7689
1 parent 9a10fc3 commit 8a6632f

3 files changed

Lines changed: 16 additions & 19 deletions

File tree

test/test_plots/baseline/TestPlot/single_date.png renamed to lib/matplotlib/tests/baseline_images/test_axes/single_date.png

File renamed without changes.

lib/matplotlib/tests/test_axes.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,3 +181,19 @@ def test_single_point():
181181
pylab.plot( [1], [1], 'o' )
182182

183183
fig.savefig( 'single_point' )
184+
185+
@image_comparison(baseline_images=['single_date'])
186+
def test_single_date():
187+
"""Test single-point date plots."""
188+
189+
time1=[ 721964.0 ]
190+
data1=[ -65.54 ]
191+
192+
fig = pylab.figure()
193+
pylab.subplot( 211 )
194+
pylab.plot_date( time1, data1, 'o', color='r' )
195+
196+
pylab.subplot( 212 )
197+
pylab.plot( time1, data1, 'o', color='r' )
198+
199+
fig.savefig( 'single_date' )

test/test_plots/TestPlot.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -40,25 +40,6 @@ def tearDown( self ):
4040
"""Clean-up any generated files here."""
4141
pass
4242

43-
#--------------------------------------------------------------------
44-
def test_single_date( self ):
45-
"""Test single-point date plots."""
46-
47-
fname = self.outFile( "single_date.png" )
48-
49-
time1=[ 721964.0 ]
50-
data1=[ -65.54 ]
51-
52-
fig = pylab.figure()
53-
pylab.subplot( 211 )
54-
pylab.plot_date( time1, data1, 'o', color='r' )
55-
56-
pylab.subplot( 212 )
57-
pylab.plot( time1, data1, 'o', color='r' )
58-
59-
fig.savefig( fname )
60-
self.checkImage( fname )
61-
6243
#--------------------------------------------------------------------
6344
def test_shaped_data( self ):
6445
"""Test numpy shaped data."""

0 commit comments

Comments
 (0)