This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author agoucher
Recipients agoucher
Date 2008-01-28.14:39:32
SpamBayes Score 0.012062409
Marked as misclassified No
Message-id <1201531179.73.0.502077509605.issue1955@psf.upfronthosting.co.za>
In-reply-to
Content
There are a couple places in unittest where 'issubclass(something,
TestCase)' is used. This prevents you from organizing your test code via
class hierarchies. To solve this problem, issubclass should be looking
whether the object is a subclass of unittest.TestCase to walk the
inheritance tree all the way up and not just a single level.

Currently, this will not work.
module A..
class A(unittest.TestCase):
    pass

module B...
import A

class B(A.A)
    def testFoo(self):
        print "blah blah blah

I have attached a patch which will address all locations where this
could happen.
History
Date User Action Args
2008-01-28 14:39:39agouchersetspambayes_score: 0.0120624 -> 0.012062409
recipients: + agoucher
2008-01-28 14:39:39agouchersetspambayes_score: 0.0120624 -> 0.0120624
messageid: <1201531179.73.0.502077509605.issue1955@psf.upfronthosting.co.za>
2008-01-28 14:39:33agoucherlinkissue1955 messages
2008-01-28 14:39:32agouchercreate