Message 266600 - Python tracker

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.

Content
Proposed patch adds the ExtraAssertions mix-in that provides additional assert methods. These methods provide better failure report than assertTrue/assertFalse with a result of corresponding function. For example assertStartsWith outputs shorten reprs of the start of the string and prefix.

These checks are quite popular and can be used tens or hundreds times in tests (the patch makes tests using new assert methods):

assertHasAttr       121 times
assertNotHasAttr     99 times
assertIsSubclass    243 times
assertNotIsSubclass  95 times
assertStartsWith    131 times
assertEndsWith       73 times