Message2062
I tripped over a partially fixed problem in unittest.py today.
loadTestsFromName has been changed already to look whether the class it is looking in for tests is subclassed from unittest.TestCase. loadTestsFromModule however still just looks for TestCase. This results in not being able to find tests in a class that is not a direct subclass of TestCase.
The following structure currently won't 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 the patch to fix this. |
|
Date |
User |
Action |
Args |
2008-02-20 17:18:09 | admin | link | issue1878473 messages |
2008-02-20 17:18:09 | admin | create | |
|