Message307062
Ah, the problem isn't that it's running getattr() on test methods, but that it runs getattr() on all methods.
Former code: attrname.startswith(prefix) and \
callable(getattr(testCaseClass, attrname))
New code: testFunc = getattr(testCaseClass, attrname)
isTestMethod = attrname.startswith(self.testMethodPrefix) and callable(testFunc)
This is trivial to fix. @Core devs: Should I revert to original behaviour with the order of the prefix check and the getattr() call, and add a regression test that guarantees this behaviour? |
|
Date |
User |
Action |
Args |
2017-11-27 16:12:54 | jonash | set | recipients:
+ jonash, pitrou, vstinner, rbcollins, ezio.melotti, michael.foord, Tim.Graham |
2017-11-27 16:12:54 | jonash | set | messageid: <1511799174.0.0.213398074469.issue32071@psf.upfronthosting.co.za> |
2017-11-27 16:12:53 | jonash | link | issue32071 messages |
2017-11-27 16:12:53 | jonash | create | |
|