[Python-Dev] PEP: Consolidating names and classes in the `unittest` module (updated 2008-07-15)

Stephen J. Turnbull stephen at xemacs.org
Tue Jul 15 13:52:15 CEST 2008

Ben Finney writes:

 > > Message-ID: <loom.20080714T230912-310 at post.gmane.org>
 > > From: Antoine Pitrou <solipsis at pitrou.net>
 > That measured only usage of unittest *within the Python standard
 > library*. Is that the only body of unittest-using code we need
 > consider?

Yes, for the purposes of this PEP.  We already know that many people
want various different things.  You want fail* /rather than/ assert*,
but Steven d'Aprono wants /both/, and I prefer assert* /exclusively/.
I don't see why we all shouldn't be satisfied[1], so the content of
unittest should not set policy for our own projects.  So there should
be other modules (perhaps in the stdlib, perhaps not) to satisfy those
preferences not catered to by stdlib's unittest.

Thus this PEP should restrict it's concern to revising unittest to
conform to PEPs and help standardize Python's own testing, without
trying to impose standards on the whole community of Python users.

That's my rationale.  YMMV.

[1]  For myself, if the fail*-only proposal wins, I'd switch to that;
fighting the tide on this isn't my idea of fun.  But other assert*
fans may be more faithful to their original preference.

More information about the Python-Dev mailing list