[New-bugs-announce] [issue27152] Additional assert methods for unittest
Serhiy Storchaka
report at bugs.python.org
Sun May 29 11:25:19 EDT 2016
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 <report at bugs.python.org>
<http://bugs.python.org/issue27152>
_______________________________________
More information about the New-bugs-announce
mailing list