[AstroPy] Testing Guidelines

Mark Sienkiewicz sienkiew at stsci.edu
Wed Aug 17 15:11:21 EDT 2011


Victoria G. Laidler wrote:
> Mike Droettboom has experimented with py.test a little bit while 
> working on a py.test plugin for Pandokia. He reports that it's not 
> quite so compatible as all that, ie, there are useful test extensions 
> (such as module-level setup and teardown) that are supported by nose 
> that py.test does not handle correctly.

It appears that the nose compatibility is not good enough that you can 
just assume your nose tests will work in py.test. When I look at it 
closely, it looks more like marketing than actual working software.  A 
lot of the compatibility mode depends on the similarity between the 
systems, but there are some things where there is actual compatibility code.

I know of nothing you can do in nose that you can't do in py.test.  
There are many differences in syntax, though.

It is still possible to write to a simplified test format that work in 
both systems.  I have sample tests that work in both unmodified that 
have:  module setup, module teardown, test function, test class (with 
setup and teardown), skip test function/method (using a helper 
function), test generator using yield

Mark




More information about the AstroPy mailing list