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

Skip to content

Commit 9a10fc3

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

3 files changed

Lines changed: 11 additions & 15 deletions

File tree

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

File renamed without changes.

lib/matplotlib/tests/test_axes.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,3 +170,14 @@ def test_fill_units():
170170
fig.autofmt_xdate()
171171
fig.savefig( 'fill_units' )
172172

173+
@image_comparison(baseline_images=['single_point'])
174+
def test_single_point():
175+
"""Test single-point plots."""
176+
fig = pylab.figure()
177+
pylab.subplot( 211 )
178+
pylab.plot( [0], [0], 'o' )
179+
180+
pylab.subplot( 212 )
181+
pylab.plot( [1], [1], 'o' )
182+
183+
fig.savefig( 'single_point' )

test/test_plots/TestPlot.py

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

43-
#--------------------------------------------------------------------
44-
def test_single_point( self ):
45-
"""Test single-point plots."""
46-
fname = self.outFile( "single_point.png" )
47-
48-
fig = pylab.figure()
49-
pylab.subplot( 211 )
50-
pylab.plot( [0], [0], 'o' )
51-
52-
pylab.subplot( 212 )
53-
pylab.plot( [1], [1], 'o' )
54-
55-
fig.savefig( fname )
56-
self.checkImage( fname )
57-
5843
#--------------------------------------------------------------------
5944
def test_single_date( self ):
6045
"""Test single-point date plots."""

0 commit comments

Comments
 (0)