Revision: 7675
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7675&view=rev
Author:   astraw
Date:     2009-09-07 17:18:44 +0000 (Mon, 07 Sep 2009)

Log Message:
-----------
testing: add test for bug SF#2715172

Modified Paths:
--------------
    trunk/matplotlib/lib/matplotlib/tests/test_dates.py

Modified: trunk/matplotlib/lib/matplotlib/tests/test_dates.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/tests/test_dates.py 2009-09-07 16:57:36 UTC 
(rev 7674)
+++ trunk/matplotlib/lib/matplotlib/tests/test_dates.py 2009-09-07 17:18:44 UTC 
(rev 7675)
@@ -66,6 +66,25 @@
     fig.autofmt_xdate()
     fig.savefig('date_axvline')
 
+...@image_comparison(baseline_images=['date_xlim_empty'])
+def test_set_xlim_and_unexpected_handling():
+    # Attempt to test SF 2715172, see
+    # 
https://sourceforge.net/tracker/?func=detail&aid=2715172&group_id=80706&atid=560720
+    t0 = datetime.datetime(2000, 1, 20)
+    tf = datetime.datetime(2000, 1, 20)
+    fig = plt.figure()
+    ax = fig.add_subplot(1,1,1)
+    ax.set_xlim((t0,tf))
+    ax.plot([],[])
+    from matplotlib.dates import DayLocator, DateFormatter, HourLocator
+    ax.xaxis.set_major_locator(DayLocator())
+    ax.xaxis.set_major_formatter(DateFormatter("%m/%d/%y, %I:%M%p"))
+    ax.xaxis.set_minor_locator(HourLocator())
+    if 1:
+        # this seems to cause an ininite loop.
+        from nose.plugins.skip import SkipTest
+        raise SkipTest('avoiding never-ending drawing')
+    fig.savefig('date_xlim_empty')
 
 if __name__=='__main__':
     import nose


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