[Python-Dev] PEP: Frequently-requested additional features for the `unittest` module
Ben Finney
ben+python at benfinney.id.au
Wed Jul 16 05:04:12 CEST 2008
Michael Foord <fuzzyman at voidspace.org.uk> writes:
> The full list of changes proposed […] and not shot down was
> something like:
[…]
> assertLessThan
> assertGreaterThan
> assertLessThanOrEquals
> assertGreaterThanOrEquals
[…]
"Brett Cannon" <brett at python.org> writes:
> Is any of this really necessary? Isn't this the equivalent of
> ``assert_(a < b)``? It seems like the only thing you get out of this
> is a nicer error message, but ``assert_(a < b, 'not %r <= %s' % (a,
> b))`` is not that complex. And do these cases really come up that
> often? I would want to see some numbers showing that these are
> really necessary (in both usage and people even specifying an error
> message in the first place).
Though I'm the champion of this PEP, I'll have to refer to Michael
Foord for his reasoning (or reference to others' reasoning) on this.
--
\ “The process by which banks create money is so simple that the |
`\ mind is repelled.” —John Kenneth Galbraith, _Money: Whence It |
_o__) Came, Where It Went_, 1975 |
Ben Finney
More information about the Python-Dev
mailing list