[New-bugs-announce] [issue37719] addSubtest not calling addFailure and addError

Xavier Dollé report at bugs.python.org
Tue Jul 30 05:46:06 EDT 2019


New submission from Xavier Dollé <xdo at odoo.com>:

addSubTest from TestResult is appending elements to failures and errors without using addFailure or addError, making the extend of this class more difficult.

suggestion:

def addSubTest(self, test, subtest, err):
...
    if issubclass(err[0], test.failureException):
        self.addFailure(subtest, err)
    else:
        self.addError(subtest, err)

The suggested change would make it more concise and easier to extend.

----------
components: Tests
messages: 348728
nosy: Xavier Dollé
priority: normal
severity: normal
status: open
title: addSubtest not calling addFailure and addError
type: enhancement
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37719>
_______________________________________


More information about the New-bugs-announce mailing list