[Twisted-Python] Re: [Twisted-commits] r18549 - Clean up t.web.soap.SOAPPublisher.lookupFunction

On Thu, 26 Oct 2006 23:31:32 -0600, Jonathan Lange <jml@wolfwood.twistedmatrix.com> wrote:
assertTrue? assertFalse? :/ Why does trial have _four_ different names for each of these functions? Slightly more relevantly, shouldn't at least the last of these three be assertIdentical(..., None)? It is a common mistake throughout Twisted to test for truth when the real intent is to test against None, so I'm mostly pointing this out in the hopes of reducing new cases of it being introduced in the future. Jean-Paul

Quoting Jean-Paul Calderone <exarkun@divmod.com>:
Agree. But a choice should be made, and then deprecations put on other names. The fact other unittest libs can use the 4 has been a criteria, I guess.
Well I do intent to test False. The fact it returns None is an implementation detail: we could modify lookupFunction to return '' or False without modifying the tests. That might no be the good decision, though, but the reviewer didn't scream :). -- Thomas

On 10/28/06, Jean-Paul Calderone <exarkun@divmod.com> wrote:
Compatibility, both backwards and lateral. I don't think I would object if someone decided to make the coding standard restrict the allowable names of assert methods. jml

Quoting Jean-Paul Calderone <exarkun@divmod.com>:
Agree. But a choice should be made, and then deprecations put on other names. The fact other unittest libs can use the 4 has been a criteria, I guess.
Well I do intent to test False. The fact it returns None is an implementation detail: we could modify lookupFunction to return '' or False without modifying the tests. That might no be the good decision, though, but the reviewer didn't scream :). -- Thomas

On 10/28/06, Jean-Paul Calderone <exarkun@divmod.com> wrote:
Compatibility, both backwards and lateral. I don't think I would object if someone decided to make the coding standard restrict the allowable names of assert methods. jml
participants (3)
-
Jean-Paul Calderone
-
Jonathan Lange
-
Thomas HERVE