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

Jean-Paul Calderone exarkun at divmod.com
Fri Oct 27 09:53:23 EDT 2006

On Thu, 26 Oct 2006 23:31:32 -0600, Jonathan Lange <jml at wolfwood.twistedmatrix.com> wrote:
> [snip]
>+        self.assertTrue(self.publisher.lookupFunction("add"))
>+        self.assertTrue(self.publisher.lookupFunction("fail"))
>+        self.assertFalse(self.publisher.lookupFunction("foobar"))

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.


More information about the Twisted-Python mailing list