[Python-Dev] PEP: Consolidating names in the unittest module (original) (raw)

Stephen J. Turnbull stephen at xemacs.org
Wed Jul 16 00:20:40 CEST 2008


Ben Finney writes:

Removal of assert* names

Arguments in favour of retaining only the assert* names:

FWIW, I think these are fairly stated. So fairly that I'm surprised you haven't been persuaded! Nitpick: the second point is not just "precedent", there's an economic reason there too. Tests in the standard distribution which use the deprecated style will need to be converted. Steven d'Aprano claims this is nontrivial (and thus error- prone) in some cases. I haven't seen that claim denied, and it seems plausible to me.

PEP 8 names

Although unittest (and its predecessor PyUnit) are intended to be familiar to users of other xUnit interfaces, there is no attempt at direct API compatibility since the only code that Python's unittest interfaces with is other Python code. The module is in the standard library and its names should all conform with PEP 8 [#PEP-8]_.

You should mention Raymond's concern that PEP 8 names are quite a bit longer.



More information about the Python-Dev mailing list