Nick Coghlan wrote:
[...]
>
> What did you think of the "check" idea at the end of the email?
>
> Test assertions:
>   check(x).almost_equal(y)
>   check(x).is_(y)
>   check(x).in_(y)
>   check(x).equals(y)
>
> Test negative assertions:
>   check(x).not_almost_equal(y)
>   check(x).is_not(y)
>   check(x).not_in(y)
>   check(x).not_equal(y)

Wow.

This is a textbook example of a bikeshed discussion.  The names (and now
syntax!) of assertions are the most cosmetic issue there is with the unittest
module, yet I see over *200* messages about it.

Deeper, but important issues, such as how to raise structured exceptions that a
GUI test runner could usefully display and introspect, are ignored.  I can list
lots of others.

For assertions, just flip a coin already (or a roll a d20, perhaps...).  Can we
perhaps devote this considerable energy to significant improvements, please?

-Andrew.

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to