New submission from Serhiy Storchaka: 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 ---------- components: Tests files: extra_assertions.patch keywords: patch messages: 266600 nosy: ezio.melotti, michael.foord, r.david.murray, rbcollins, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Additional assert methods for unittest type: enhancement versions: Python 3.6 Added file: http://bugs.python.org/file43047/extra_assertions.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27152> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com