nose-devs/nose — Issue #80: Classes with __metaclass__ are never considered as test candidates
Author: jpellerin
Created: 2011-12-14 15:58:30+00:00
State: open

A class with a __metaclass__ will never be considered as a test class.

This is due to the fact that isclass in nose.utils checks if the type of an
object is either TypeType or ClassType.

In order to support test classes with metaclass annotations, this should be:

def isclass(obj):
"""Is obj a class? inspect's isclass is too liberal and returns True
for objects that can't be subclasses of anything.
"""
return isinstance(type(obj), class_types)

Google Code Info:
Issue #: 153
Author: shlo...@gmx.net
Created On: 2008-01-30T18:58:25.000Z
Closed On: 2008-03-06T15:29:15.000Z