New submission from Gregory Salvan:

Actually unittest assertions depends on testcase class forcing us to extend it 
to add assertions and to use it to make assertions outside tests.

Seeing interests in rethinking the way assertions are done in unittest, this 
issue first intent to collect feedback in order to suggest an implementation 
that fit the most.

Some notes from private discussions:
- it was briefly discussed here #18054.
- taking care of popular solutions like py.test's rich assert
statements and the testtools matcher objects.
- avoid unnecessary complexity, staying focused on value

My opinion:
- must not change unittest api
- may be put in a seperate package (splitting "unittest" in "unittest" and 
"assertions")
- Open to hide assertions exceptions in optimized mode or providing a simple 
way to change default behaviour (log, skip... instead of throwing unhandled 
exception).

----------
components: Tests
messages: 203295
nosy: Gregory.Salvan, michael.foord, ncoghlan, rbcollins
priority: normal
severity: normal
status: open
title: Improving unittest assertions
type: enhancement
versions: Python 3.5

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19645>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to