[Python-Dev] PEP: Consolidating names and classes in the unittestmodule (updated 2008-07-15) (original) (raw)

Ben Finney ben+python at benfinney.id.au
Wed Jul 16 08:25:06 CEST 2008


Nick Coghlan <ncoghlan at gmail.com> writes:

What did you think of the "check" idea at the end of the email?

Test assertions: check(x).almostequal(y) check(x).is(y) check(x).in(y) check(x).equals(y) Test negative assertions: check(x).notalmostequal(y) check(x).isnot(y) check(x).notin(y) check(x).notequal(y)

-1

'check' is even less explicit about what will happen than 'assert'. At least the latter has existing programming-language connotations of "fail immediately if not true", which 'check' lacks.

-- \ “I used to work in a fire hydrant factory. You couldn't park | `\ anywhere near the place.” —Steven Wright | o_) | Ben Finney



More information about the Python-Dev mailing list