Revision: 7693
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7693&view=rev
Author:   astraw
Date:     2009-09-07 20:04:56 +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

Added Paths:
-----------
    
trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_axes/polar_units.png

Removed Paths:
-------------
    trunk/matplotlib/test/test_plots/TestPolar.py
    trunk/matplotlib/test/test_plots/baseline/TestPolar/polar_units.png

Copied: 
trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_axes/polar_units.png 
(from rev 7692, 
trunk/matplotlib/test/test_plots/baseline/TestPolar/polar_units.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:38 UTC 
(rev 7692)
+++ trunk/matplotlib/lib/matplotlib/tests/test_axes.py  2009-09-07 20:04:56 UTC 
(rev 7693)
@@ -288,3 +288,27 @@
     pylab.rgrids( [0.05, 0.1, 0.15, 0.2, 0.25, 0.3] )
 
     fig.savefig( 'polar_wrap_360' )
+
+...@image_comparison(baseline_images=['polar_units'])
+def test_polar_units():
+    """Test polar plots with unitized data."""
+    import matplotlib.testing.jpl_units as units
+    units.register()
+
+    pi = np.pi
+    deg = units.UnitDbl( 1.0, "deg" )
+
+    x1 = [ pi/6.0, pi/4.0, pi/3.0, pi/2.0 ]
+    x2 = [ 30.0*deg, 45.0*deg, 60.0*deg, 90.0*deg ]
+
+    y1 = [ 1.0, 2.0, 3.0, 4.0]
+    y2 = [ 4.0, 3.0, 2.0, 1.0 ]
+
+    fig = pylab.figure()
+
+    pylab.polar( x2, y1, color = "blue" )
+
+    # polar( x2, y1, color = "red", xunits="rad" )
+    # polar( x2, y2, color = "green" )
+
+    fig.savefig( 'polar_units' )

Deleted: trunk/matplotlib/test/test_plots/TestPolar.py
===================================================================
--- trunk/matplotlib/test/test_plots/TestPolar.py       2009-09-07 20:04:38 UTC 
(rev 7692)
+++ trunk/matplotlib/test/test_plots/TestPolar.py       2009-09-07 20:04:56 UTC 
(rev 7693)
@@ -1,67 +0,0 @@
-#=======================================================================
-"""The Polar unit-test class implementation."""
-#=======================================================================
-
-from mplTest import *
-
-#=======================================================================
-# Add import modules below.
-import matplotlib
-matplotlib.use( "Agg", warn = False )
-
-import pylab
-import numpy as npy
-#
-#=======================================================================
-
-#=======================================================================
-class TestPolar( MplTestCase ):
-   """Polar unit test class."""
-
-   # Uncomment any appropriate tags
-   tags = [
-            # 'gui',        # requires the creation of a gui window
-            'agg',        # uses agg in the backend
-            'agg-only',   # uses only agg in the backend
-            # 'wx',         # uses wx in the backend
-            # 'qt',         # uses qt in the backend
-            # 'ps',         # uses the postscript backend
-            # 'units',      # uses units in the test
-            'PIL',        # uses PIL for image comparison
-          ]
-
-   #--------------------------------------------------------------------
-   def setUp( self ):
-      """Setup any data needed for the unit test."""
-      units.register()
-
-   #--------------------------------------------------------------------
-   def tearDown( self ):
-      """Clean-up any generated files here."""
-      pass
-
-   #--------------------------------------------------------------------
-   def test_polar_units( self ):
-      """Test polar plots with unitized data."""
-
-      fname = self.outFile( "polar_units.png" )
-
-      pi = npy.pi
-      deg = units.UnitDbl( 1.0, "deg" )
-
-      x1 = [ pi/6.0, pi/4.0, pi/3.0, pi/2.0 ]
-      x2 = [ 30.0*deg, 45.0*deg, 60.0*deg, 90.0*deg ]
-
-      y1 = [ 1.0, 2.0, 3.0, 4.0]
-      y2 = [ 4.0, 3.0, 2.0, 1.0 ]
-
-      fig = pylab.figure()
-
-      pylab.polar( x2, y1, color = "blue" )
-
-      # polar( x2, y1, color = "red", xunits="rad" )
-      # polar( x2, y2, color = "green" )
-
-      fig.savefig( fname )
-      self.checkImage( fname )
-

Deleted: trunk/matplotlib/test/test_plots/baseline/TestPolar/polar_units.png
===================================================================
(Binary files differ)


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to