From 041ce97b876a8c241875033aac423fa85d60f9ab 2009-03-10 19:44:47
From: Fernando Perez <Fernando.Perez@berkeley.edu>
Date: 2009-03-10 19:44:47
Subject: [PATCH] Update to upstream of numpy decorators, and add a few fixes.

Note that right now this means our copy diverges from upstream, because I
have a few fixes of my own I need to send to them.  I will later sync and
send those patches to them, so we sync again.

---

diff --git a/IPython/testing/decorators_numpy.py b/IPython/testing/decorators_numpy.py
index dd9783e..42727f2 100644
--- a/IPython/testing/decorators_numpy.py
+++ b/IPython/testing/decorators_numpy.py
@@ -46,13 +46,16 @@ def setastest(tf=True):
         return t
     return set_test
 
-def skipif(skip_condition, msg=None):
+def skipif(skip_condition=True, msg=None):
     ''' Make function raise SkipTest exception if skip_condition is true
 
     Parameters
     ---------
-    skip_condition : bool
-        Flag to determine whether to skip test (True) or not (False)
+    skip_condition : bool or callable. 
+ 	Flag to determine whether to skip test.  If the condition is a 
+ 	callable, it is used at runtime to dynamically make the decision.  This 
+ 	is useful for tests that may require costly imports, to delay the cost 
+ 	until the test suite is actually executed.        
     msg : string
         Message to give on raising a SkipTest exception