Issue1878473
Created on 2008-01-23.20:28:30 by agoucher, last changed 2009-03-08.06:39:13 by zyasoft.
msg2062 (view) |
Author: Adam Goucher (agoucher) |
Date: 2008-01-23.20:28:30 |
|
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.
|
msg4192 (view) |
Author: Jim Baker (zyasoft) |
Date: 2009-03-08.06:39:09 |
|
We use the same unittest as CPython 2.5, and the example mentioned works
the same in both, as would be expected.
|
|
Date |
User |
Action |
Args |
2009-03-08 06:39:13 | zyasoft | set | status: open -> closed resolution: works for me messages:
+ msg4192 nosy:
+ zyasoft |
2008-01-23 20:28:30 | agoucher | create | |
|