Revision: 7683
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7683&view=rev
Author:   astraw
Date:     2009-09-07 20:02:06 +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_dates.py

Added Paths:
-----------
    
trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_dates/DateFormatter_fractionalSeconds.png

Removed Paths:
-------------
    trunk/matplotlib/test/test_matplotlib/TestTickers.py
    
trunk/matplotlib/test/test_matplotlib/baseline/TestTickers/DateFormatter_fractionalSeconds.png

Copied: 
trunk/matplotlib/lib/matplotlib/tests/baseline_images/test_dates/DateFormatter_fractionalSeconds.png
 (from rev 7682, 
trunk/matplotlib/test/test_matplotlib/baseline/TestTickers/DateFormatter_fractionalSeconds.png)
===================================================================
(Binary files differ)

Modified: trunk/matplotlib/lib/matplotlib/tests/test_dates.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/tests/test_dates.py 2009-09-07 20:01:49 UTC 
(rev 7682)
+++ trunk/matplotlib/lib/matplotlib/tests/test_dates.py 2009-09-07 20:02:06 UTC 
(rev 7683)
@@ -113,6 +113,35 @@
 
     fig.savefig( 'RRuleLocator_bounds' )
 
+...@image_comparison(baseline_images=['DateFormatter_fractionalSeconds'])
+def test_DateFormatter():
+    """Test DateFormatter"""
+    import pylab
+    from datetime import datetime
+    import matplotlib.testing.jpl_units as units
+    units.register()
+
+    # Lets make sure that DateFormatter will allow us to have tick marks
+    # at intervals of fractional seconds.
+
+    t0 = datetime( 2001, 1, 1, 0, 0, 0 )
+    tf = datetime( 2001, 1, 1, 0, 0, 1 )
+
+    fig = pylab.figure()
+    ax = pylab.subplot( 111 )
+    ax.set_autoscale_on( True )
+    ax.plot( [t0, tf], [0.0, 1.0], marker='o' )
+
+    # rrule = mpldates.rrulewrapper( dateutil.rrule.YEARLY, interval=500 )
+    # locator = mpldates.RRuleLocator( rrule )
+    # ax.xaxis.set_major_locator( locator )
+    # ax.xaxis.set_major_formatter( mpldates.AutoDateFormatter(locator) )
+
+    ax.autoscale_view()
+    fig.autofmt_xdate()
+
+    fig.savefig( 'DateFormatter_fractionalSeconds' )
+
 if __name__=='__main__':
     import nose
     nose.runmodule(argv=['-s','--with-doctest'], exit=False)

Deleted: trunk/matplotlib/test/test_matplotlib/TestTickers.py
===================================================================
--- trunk/matplotlib/test/test_matplotlib/TestTickers.py        2009-09-07 
20:01:49 UTC (rev 7682)
+++ trunk/matplotlib/test/test_matplotlib/TestTickers.py        2009-09-07 
20:02:06 UTC (rev 7683)
@@ -1,75 +0,0 @@
-#=======================================================================
-"""The Tickers unit-test class implementation."""
-#=======================================================================
-
-from mplTest import *
-
-#=======================================================================
-# Add import modules below.
-import matplotlib
-matplotlib.use( "Agg", warn = False )
-
-import pylab
-import numpy as npy
-from datetime import datetime
-
-import dateutil
-import matplotlib.dates as mpldates
-import matplotlib.ticker as ticker
-#
-#=======================================================================
-
-#=======================================================================
-class TestTickers( MplTestCase ):
-   """Test the various axes non-plotting methods."""
-
-   # 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_DateFormatter( self ):
-      """Test DateFormatter"""
-
-      # Lets make sure that DateFormatter will allow us to have tick marks
-      # at intervals of fractional seconds.
-      fname = self.outFile( "DateFormatter_fractionalSeconds.png" )
-
-      t0 = datetime( 2001, 1, 1, 0, 0, 0 )
-      tf = datetime( 2001, 1, 1, 0, 0, 1 )
-
-      fig = pylab.figure()
-      ax = pylab.subplot( 111 )
-      ax.set_autoscale_on( True )
-      ax.plot( [t0, tf], [0.0, 1.0], marker='o' )
-
-      # rrule = mpldates.rrulewrapper( dateutil.rrule.YEARLY, interval=500 )
-      # locator = mpldates.RRuleLocator( rrule )
-      # ax.xaxis.set_major_locator( locator )
-      # ax.xaxis.set_major_formatter( mpldates.AutoDateFormatter(locator) )
-
-      ax.autoscale_view()
-      fig.autofmt_xdate()
-
-      fig.savefig( fname )
-      self.checkImage( fname )
-
-   #--------------------------------------------------------------------

Deleted: 
trunk/matplotlib/test/test_matplotlib/baseline/TestTickers/DateFormatter_fractionalSeconds.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
Matplotlib-checkins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to