Issue5663
Created on 2009-04-02 01:58 by michael.foord, last changed 2022-04-11 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| unittest-messages.diff | michael.foord, 2009-04-02 01:58 | |||
| unittest-messages.diff | michael.foord, 2009-04-02 03:12 | |||
| Messages (3) | |||
|---|---|---|---|
| msg85136 - (view) | Author: Michael Foord (michael.foord) * ![]() |
Date: 2009-04-02 01:58 | |
Patch for unittest on trunk. It provides better default failure messages for assertTrue and assertFalse (current is "AssertionError: None"). It also provides a new class attribute for TestCase: longMessage This defaults to False. If set to True, passing in an explicit custom message does *not* override the helpful default failure message in asserts which tell you which objects were involved in the failure. Even if set to True or False in a TestCase then longMessage can still be overridden in individual tests by setting an instance attribute. Needs docs. Could longMessage default to True in 3.1. |
|||
| msg85137 - (view) | Author: Michael Foord (michael.foord) * ![]() |
Date: 2009-04-02 02:02 | |
Reviewers: , Description: Patch for unittest on trunk. It provides better default failure messages for assertTrue and assertFalse (current is "AssertionError: None"). It also provides a new class attribute for TestCase: longMessage This defaults to False. If set to True, passing in an explicit custom message does *not* override the helpful default failure message in asserts which tell you which objects were involved in the failure. Even if set to True or False in a TestCase then longMessage can still be overridden in individual tests by setting an instance attribute. Needs docs. Could longMessage default to True in 3.1? Please review this at http://codereview.appspot.com/32102 Affected files: Lib/test/test_unittest.py Lib/unittest.py Misc/NEWS |
|||
| msg85150 - (view) | Author: Michael Foord (michael.foord) * ![]() |
Date: 2009-04-02 03:12 | |
Updated patch with better docstring for _formatMessage and docs. Patch reviewed by Brett Cannon so will commit. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:56:47 | admin | set | github: 49913 |
| 2009-04-02 03:22:52 | michael.foord | set | status: open -> closed resolution: accepted |
| 2009-04-02 03:12:42 | michael.foord | set | files:
+ unittest-messages.diff messages: + msg85150 |
| 2009-04-02 02:02:23 | fuzzyman | set | nosy:
+ fuzzyman messages: + msg85137 |
| 2009-04-02 01:58:39 | michael.foord | create | |
