[py-dev] Instantiating Test* classes

Ian Bicking ianb at colorstudy.com
Tue May 10 18:34:00 CEST 2005


holger krekel wrote:
>>At some point py.test started instantiating all my classes that start 
>>with Test*.  This is somewhat problematic, as I have lots of support 
>>classes named TestSomething, which aren't themselves test cases.  
> 
> 
> you are talking about classes in test_*.py files, i presume. 

Yes

>>It wasn't doing this before, though I must admit I haven't run the tests 
>>for a while so I'm not sure when the change happened.
>>
>>I can rename all the classes, but of coures I'd rather not.  Is there 
>>another way of dealing with this?
> 
> 
> not that i currently can think of.  you might set 
> 'disabled=True' on class level. 

That makes sense, but it confuses me that all the tests used to work.  I 
guess before the collect branch was remerged.  I think I'll look into a 
conftest.py file that specifically avoids anything that subclasses 
SQLObject; I have to figure out that stuff anyway.

-- 
Ian Bicking  /  ianb at colorstudy.com  /  http://blog.ianbicking.org


More information about the py-dev mailing list