Comment 1 for bug 704219

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 704219] Re: wish for invertible matchers

One idea on this:

Perhaps what I want is assertThat() to be a HOF that takes an
expression and evaluates it. If it evaluates to False, it will
display as much information is as is possible/useful about the
expression and its evaluation, so that we can understand the failure
without having to reproduce it or break into it with a debugger.

The problem with a crude Not that is simply given the evaluated value
of the inner expression is that it cannot say anything more about that
expression if it fails. However, if we instead printed the inner
expression including the variable bindings, then it would probably be
clear why there was a problem.