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 jonash
Recipients Tim.Graham, ezio.melotti, jonash, michael.foord, pitrou, rbcollins, vstinner
Date 2017-11-27.16:12:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1511799174.0.0.213398074469.issue32071@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2017-11-27 16:12:54jonashsetrecipients: + jonash, pitrou, vstinner, rbcollins, ezio.melotti, michael.foord, Tim.Graham
2017-11-27 16:12:54jonashsetmessageid: <1511799174.0.0.213398074469.issue32071@psf.upfronthosting.co.za>
2017-11-27 16:12:53jonashlinkissue32071 messages
2017-11-27 16:12:53jonashcreate