[Numpy-tickets] [NumPy] #957: decorators don't work with test generators

NumPy numpy-tickets@scipy....
Wed Dec 31 04:35:26 CST 2008


#957: decorators don't work with test generators
----------------------------+-----------------------------------------------
 Reporter:  jarrod.millman  |        Owner:  somebody
     Type:  defect          |       Status:  new     
 Priority:  normal          |    Milestone:  1.3.0   
Component:  numpy.testing   |      Version:  devel   
 Severity:  normal          |   Resolution:          
 Keywords:                  |  
----------------------------+-----------------------------------------------
Comment (by alan.mcintyre):

 In case it's useful to somebody in the future (I didn't see it mentioned
 anywhere in the comments here): Fernando's patch checks for generators
 using a handy function from nose, nose.util.isgenerator.  It looks at
 co_flags to determine whether its argument is a function or a generator.

 I'm writing up some tests for the decorators module, and will post an
 updated patch containing them in the next couple of days.

 I'll also probably update the knownfailureif and setastest decorators to
 take callable skip conditions as well, just for consistency.

-- 
Ticket URL: <http://scipy.org/scipy/numpy/ticket/957#comment:3>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.


More information about the Numpy-tickets mailing list